summaryrefslogtreecommitdiffstats
path: root/media/audio/win
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix bug when unplugging an audio input device whilst using speech input on ↵allanwoj@chromium.org2011-06-151-2/+6
| | | | | | | | | | | | | Windows. Added a three second timeout for not receiving an OnData callback in AudioInputController and a one second timeout for not receiving any callback in PCMWaveInAudioInputStream. Also added a unit test fixture for it. BUG=79936 TEST=Unplug microphone while using speech input, browser should no longer hang. Review URL: http://codereview.chromium.org/7129057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89197 0039d316-1c4b-4281-b951-d872f2087c98
* Adding GetAudioInputDeviceNames() to AudioManager, which allows for device ↵scherkus@chromium.org2011-06-012-0/+15
| | | | | | | | | | | | | | enumeration. The current version only supports the default device and isn't fully implemented for Mac/Windows yet. Patch by xians@chromium.org: http://codereview.chromium.org/7060011/ BUG=none TEST=media_unittests git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87493 0039d316-1c4b-4281-b951-d872f2087c98
* Description:annacc@chromium.org2011-05-161-26/+32
| | | | | | | | | | | | | | | | | This patch gets the channel layout for surround sound channel order from ffmpeg and stores it so that chromium will be able to re-order the channels for various sound cards and OSes later. - AudioParameters gets a new field (channel_layout). - channel_layout.h stores an enum that we will use in chromium for channel values. - ffmpeg_common.h gets a new method for mapping the channel layout received from ffmpeg to an internal chromium enum value. BUG=None (though storing the channel order should help us solve some other bugs soon) TEST=media_unittests Review URL: http://codereview.chromium.org/6930039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85541 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Cleaning up src/media to be consistent with static versus anonymous namespaces.scherkus@chromium.org2011-03-074-36/+18
| | | | | | | | | | | | | We were using a mix of both (and sometimes even static functions *inside* anonymous namespaces!) so we decided to stick to using static. Also moved static/test code into media namespace and removed media:: prefixes. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/6628020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77135 0039d316-1c4b-4281-b951-d872f2087c98
* Adds method to invoke platform provided audio input UI.satish@chromium.org2011-03-012-0/+30
| | | | | | | | | | | This will be used in a future CL by the speech input feature. BUG=69886 TEST=none Review URL: http://codereview.chromium.org/6602012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76363 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash in WinAudioTest.PCMWaveStreamOpenLimit.robertshield@chromium.org2011-02-131-2/+3
| | | | | | | | | BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6487024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74745 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash in reading audio capture device name.satish@chromium.org2011-01-141-0/+3
| | | | | | | | | | | Relevant crash report: http://crash/reportdetail?reportid=c48906f8d604a9d5#crashing_thread BUG=69608 TEST=none Review URL: http://codereview.chromium.org/6333005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71434 0039d316-1c4b-4281-b951-d872f2087c98
* Reland "Remove base/scoped_handle_win.h."tfarina@chromium.org2011-01-092-6/+7
| | | | | | | | | | | | | | | Fixed the problem with rlz library. Now should be fine to land this again. This reverts commit 3620d9501af7bff688862c54fdd60f7eb41797f3. Original Review URL: http://codereview.chromium.org/6126002/ BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6110005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70861 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Remove base/scoped_handle_win.h stub and fix up all callers to use ↵thakis@chromium.org2011-01-072-7/+6
| | | | | | | | | | the new location and namespace." This reverts r 70795, it broke the build. TBR=vandebo git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70802 0039d316-1c4b-4281-b951-d872f2087c98
* Remove base/scoped_handle_win.h stub and fix up all callers to use the new ↵tfarina@chromium.org2011-01-072-6/+7
| | | | | | | | | | | location and namespace. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6126002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70795 0039d316-1c4b-4281-b951-d872f2087c98
* Move audio output number limit to AudioManager.sergeyu@chromium.org2010-11-302-9/+26
| | | | | | | | | BUG=39825 TEST=None Review URL: http://codereview.chromium.org/5350003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67618 0039d316-1c4b-4281-b951-d872f2087c98
* Fix compilation of audio_manager_win.cc in Win Release.tony@chromium.org2010-11-191-87/+91
| | | | | | | | | | Also fix line endings. TBR=satish@chromium.org Review URL: http://codereview.chromium.org/5099004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66792 0039d316-1c4b-4281-b951-d872f2087c98
* On windows, send audio hardware info with speech input requests if user ↵satish@chromium.org2010-11-192-1/+116
| | | | | | | | | | | | | consented. This may help identify quality issues. BUG=61677 TEST=none Review URL: http://codereview.chromium.org/4724001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66749 0039d316-1c4b-4281-b951-d872f2087c98
* Simplified AudioOutputStream interface.sergeyu@chromium.org2010-11-117-98/+84
| | | | | | | | | | | | | 1. Removed packet_size parameter from Open(). 2. Removed OnClose() from the callback. Now the callback is guaranteed to be called only between Start() and Stop(). 3. Added samples_per_packet in the AudioParameters struct. BUG=39825 TEST=Unittests Review URL: http://codereview.chromium.org/4661001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65766 0039d316-1c4b-4281-b951-d872f2087c98
* audio use table for channels to mask to allow more of the surround optionsfbarchard@chromium.org2010-10-261-19/+39
| | | | | | | | | BUG=60361 TEST=play audio with N channels and it should come out the proper speakers Review URL: http://codereview.chromium.org/4081001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63867 0039d316-1c4b-4281-b951-d872f2087c98
* add channel mask for 6.1 surround when 7 channel audio is specifiedfbarchard@chromium.org2010-10-221-10/+21
| | | | | | | | | BUG=60329 TEST=play 6.1 on a 6.1 stereo and ensure sound is playing in the correct speakers Review URL: http://codereview.chromium.org/4072002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63542 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed a Windows-with-hardware-only unit test that is failing. Revision 59224 ↵scherkus@chromium.org2010-10-211-1/+1
| | | | | | | | | | | | increased kWinMaxChannels to 8, so 8 is no longer an invalid value. Patch by ddorwin@chromium.org: http://codereview.chromium.org/4011002/show BUG=none TEST=Run media_unittests on a real Windows machine. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63430 0039d316-1c4b-4281-b951-d872f2087c98
* add wave out extensible support for 5.1 surround soundfbarchard@chromium.org2010-10-182-18/+36
| | | | | | | | | BUG=25315 TEST=play 5.1 audio and it should come out all 6 speakers, not downmixed to stereo. Review URL: http://codereview.chromium.org/3772009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62954 0039d316-1c4b-4281-b951-d872f2087c98
* Add AudioBuffersState struct. Use it for audio synchronization.sergeyu@chromium.org2010-09-292-25/+40
| | | | | | | | | | | | | The new AudioBuffersState contains current state of the audio buffers. This object is passed all the way from the device to the audio renderer. Audio renderer uses this information to synchronize audio. BUG=52196,49110 TEST=see repro steps for 51637 and 52196. Review URL: http://codereview.chromium.org/3444017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60891 0039d316-1c4b-4281-b951-d872f2087c98
* enable folding code for 6.1 and 7.1 surround sound.fbarchard@chromium.org2010-09-132-5/+3
| | | | | | | | | BUG=54423 TEST=audio unittest and http://fbarchard0-w.ad.corp.google.com/testmatrix/gromit/gromit8.webm Review URL: http://codereview.chromium.org/3353022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59224 0039d316-1c4b-4281-b951-d872f2087c98
* This test now works for the mac audio capture code as well, and in a future ↵satish@chromium.org2010-09-023-195/+2
| | | | | | | | | | | | | CL I'll enable audio recording in linux and this test will suit that code too. In the process I changed a uint32 in a function prototype to int because style guide recommends int for such cases. I also added parameter validation code to the mac audio manager to get it pass this new test. BUG=none TEST=media_unittests should succeed as before. Review URL: http://codereview.chromium.org/3357004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58365 0039d316-1c4b-4281-b951-d872f2087c98
* Add AudioParameters struct. Use it everywhere.sergeyu@chromium.org2010-08-318-122/+113
| | | | | | | | | BUG=None TEST=unittests Review URL: http://codereview.chromium.org/3226012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58097 0039d316-1c4b-4281-b951-d872f2087c98
* Share one thread between all AudioOutputControllers instead of creating one ↵sergeyu@chromium.org2010-08-254-16/+7
| | | | | | | | | | | per stream. TEST=unittests BUG=39825 Review URL: http://codereview.chromium.org/3185022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57392 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 57254 - Share one thread between all AudioOutputControllers instead ↵scherkus@chromium.org2010-08-242-5/+16
| | | | | | | | | | | | | | of creating one per stream. TEST=unittests BUG=39825 Review URL: http://codereview.chromium.org/3185022 TBR=sergeyu@chromium.org Review URL: http://codereview.chromium.org/3192017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57256 0039d316-1c4b-4281-b951-d872f2087c98
* Share one thread between all AudioOutputControllers instead of creating one ↵sergeyu@chromium.org2010-08-242-16/+5
| | | | | | | | | | | per stream. TEST=unittests BUG=39825 Review URL: http://codereview.chromium.org/3185022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57254 0039d316-1c4b-4281-b951-d872f2087c98
* Add a fake audio input stream for testing purposes.satish@chromium.org2010-07-151-1/+4
| | | | | | | | | | This will be used by unit tests in subsequent patches. BUG=none TEST=no new features added and nothing new to test Review URL: http://codereview.chromium.org/2909015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52464 0039d316-1c4b-4281-b951-d872f2087c98
* Add recording capability to AudioManager, and implemented on windows using ↵satish@chromium.org2010-07-145-2/+555
| | | | | | | | | | | | | the WaveIn APIs. Implementation for other platforms will follow in future patches. Also includes a unit test. BUG=none TEST=no user visible change yet, just adding audio recording backend. Review URL: http://codereview.chromium.org/2966005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52292 0039d316-1c4b-4281-b951-d872f2087c98
* Rename a header and some methods to make way for subsequent audio recording ↵satish@chromium.org2010-07-125-70/+68
| | | | | | | | | | | | | additions. Renaming audio_output.h to audio_io.h as future patches will add audio recording code to this file. Also renamed a couple of methods to make it clear that these are for audio playback/output and similar methods will be added for audio capture/recording soon. BUG=none TEST=no change in functionality. Review URL: http://codereview.chromium.org/2962006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52125 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 46314 - floating point audio support in util functions for volume and ↵fbarchard@chromium.org2010-05-041-3/+1
| | | | | | | | | | | | | | folding BUG=42861 TEST=none Review URL: http://codereview.chromium.org/1856002 TBR=fbarchard@chromium.org Review URL: http://codereview.chromium.org/1926001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46320 0039d316-1c4b-4281-b951-d872f2087c98
* floating point audio support in util functions for volume and foldingfbarchard@chromium.org2010-05-041-1/+3
| | | | | | | | | BUG=42861 TEST=none Review URL: http://codereview.chromium.org/1856002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46314 0039d316-1c4b-4281-b951-d872f2087c98
* Flush audio data after seekhclam@chromium.org2010-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is about 400 to 600 ms of audio that needs to be flushed after seek, this have a pretty UX effect. This is partially fixed in this patch by reducing the amount of data down to about at most 500 ms stored in the hardware buffer. This patch clears data in the software buffer in the browser process when seek happens. We could reduce the amount of hardware buffer to further reduce the amount of lag but that can be fixed by subsequent patch. BUG=24150 TEST=audio still works, audio still play after seek the playback of old data after seek is substantially reduced. Few changes in this patch: 1. Flush software buffer after seek in browser process 2. Get rid of prerolling, this actually has not effect at all, so getting rid of useless code Needs to be done after this patch: 1. Further reduce the remaining data after seek and pause 2. Still hit the DCHECK in ClockImpl::Play(), this doesn't seem to be a new problem introduced in this patch Review URL: http://codereview.chromium.org/1508021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43983 0039d316-1c4b-4281-b951-d872f2087c98
* Remove size_t from audio IPC code.jam@chromium.org2010-02-053-42/+42
| | | | | | | The change got to this size because I had to modify the surrounding code (I didn't want to just cast at the last minute). Review URL: http://codereview.chromium.org/577006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38192 0039d316-1c4b-4281-b951-d872f2087c98
* More plumbing of the low latency modecpu@chromium.org2010-01-134-15/+51
| | | | | | | | | | | | | | - added flag to factory to request low latency mode - implemented switch from triple buffered to double buffer on windows (mac is already double buffered all the time) - added tests BUG=28292 TEST=ut included Review URL: http://codereview.chromium.org/523073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36090 0039d316-1c4b-4281-b951-d872f2087c98
* Add a low-latency audio test that uses syncsocketscpu@chromium.org2009-12-171-0/+118
| | | | | | | | | BUG=none TEST=unit test included Review URL: http://codereview.chromium.org/500002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34787 0039d316-1c4b-4281-b951-d872f2087c98
* Move some XDG code from chrome to base, make DIR_USER_CACHE generic rather ↵thestig@chromium.org2009-12-021-0/+1
| | | | | | | | | | than Chromium specific, and clean up a few headers. BUG=none TEST=none Review URL: http://codereview.chromium.org/449048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33565 0039d316-1c4b-4281-b951-d872f2087c98
* SetVolume and GetVolume take one volume instead of separate left and right ↵fbarchard@chromium.org2009-11-043-35/+29
| | | | | | | | | | | volumes. BUG=26660 TEST=no visible difference. Make sure volume still works. Code size should go down marginally. Review URL: http://codereview.chromium.org/357004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31018 0039d316-1c4b-4281-b951-d872f2087c98
* Pause for <video> should have immediate effect on audiohclam@chromium.org2009-09-171-2/+3
| | | | | | | | | | | | | BUG=20351 A bug found while fixing mac audio. IPCAudioSouce transist to a wrong state after Play() is called. Resulting to pause having no effect. This will solve the problem of audio keeps playing a while after it is paused. Review URL: http://codereview.chromium.org/193095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26500 0039d316-1c4b-4281-b951-d872f2087c98
* Providing unplayed bytes in audio hardware bufferhclam@chromium.org2009-08-243-11/+86
| | | | | | | | | | | | | | | | | BUG=20007 TEST=WinAudioTest.PCMWaveStreamPendingBytes We used to guess what is in the hardware audio buffer to perform audio sync. But due the triple buffering and other platforms has other buffering scheme we need to be able to know how many bytes are left in the hardware buffer. We provide this data via AudioCallback::OnMoreData(), so we can predict when the requested buffer will be played. Review URL: http://codereview.chromium.org/174243 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24114 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the folding define macro.ajwong@chromium.org2009-08-201-7/+0
| | | | | | | | | | | It will never be disabled anyways and just leaves a block of code open for bitrot. BUG=none TEST=none Review URL: http://codereview.chromium.org/171017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23852 0039d316-1c4b-4281-b951-d872f2087c98
* Bump kNumBuffers to 3fbarchard@chromium.org2009-08-202-16/+22
| | | | | | | | BUG=17940 TEST=This vid should not stutter http://fbarchard-v64.ad.corp.google.com/testmatrix/color/color2.mp4 Review URL: http://codereview.chromium.org/174134 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23849 0039d316-1c4b-4281-b951-d872f2087c98
* Possible deadlock in PCM audio Start() methodcpu@chromium.org2009-08-182-6/+47
| | | | | | | | | | | | | - Implement Alpha's idea of pausing the device while we queue the first two packets. - This way we don't risk the chance to enter the callback from two threads at the same time. TEST=unit test added BUG=19276 Review URL: http://codereview.chromium.org/173022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23668 0039d316-1c4b-4281-b951-d872f2087c98
* Surround Sound handling by folding 5 channels down to stereo.fbarchard@chromium.org2009-07-252-5/+23
| | | | | | | | | BUG=16026 TEST=play a movie trailer with 5.1 audio. It should sound roughly the same as quicktime. Review URL: http://codereview.chromium.org/155894 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21613 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring to share MockAudioOutputStream implementations across 3 platformshclam@google.com2009-07-225-145/+2
| | | | | | | | | | | | | Re-trying the previous CL. The last change got reverted because of valgrind failure. TBR=scherkus Original CL: http://codereview.chromium.org/155471 Review URL: http://codereview.chromium.org/159167 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21242 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r21137 to fix Chromium mac valgrindhclam@chromium.org2009-07-215-2/+145
| | | | | | | | TBR=scherkus Review URL: http://codereview.chromium.org/159122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21154 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring to share MockAudioOutputStream implementations across 3 platformshclam@chromium.org2009-07-215-145/+2
| | | | | | Review URL: http://codereview.chromium.org/155471 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21137 0039d316-1c4b-4281-b951-d872f2087c98
* Software volume adjustment by changing samples.fbarchard@chromium.org2009-07-202-26/+20
| | | | | | | | | BUG=16500 TEST=play youtube in different window. play another video with video tag and mute sound and make sure it does not affect youtube. Review URL: http://codereview.chromium.org/159092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21091 0039d316-1c4b-4281-b951-d872f2087c98
* Allow 6 channel to pass thru to driver.fbarchard@chromium.org2009-07-161-2/+11
| | | | | | Review URL: http://codereview.chromium.org/155525 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20823 0039d316-1c4b-4281-b951-d872f2087c98
* Put some hard limits on the low level audio apicpu@google.com2009-07-013-0/+50
| | | | | | | | | | | | | | - Max number of channels (2) - Bits per sample (64) - Sampling rate (256kHz) - Queue audio buffer (64MB x 2) BUG=none TEST= WinAudioTest.SanityOnMakeParams Review URL: http://codereview.chromium.org/151093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19695 0039d316-1c4b-4281-b951-d872f2087c98
* Changed to use PushSource for the intermediate bufferhclam@chromium.org2009-06-052-0/+41
| | | | | | | | | | | | | | | between the IPC layer and the audio hardware interface. We have completely moved away from being blocking in AudioRendererHost. Since we'll be using PushSource for a longer period of buffering. It's necessary to have Play/Pause functionality in the AudioOutputStream, this is simulated by start/stop the AudioOutputStream multiple times. Review URL: http://codereview.chromium.org/114069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17707 0039d316-1c4b-4281-b951-d872f2087c98