summaryrefslogtreecommitdiffstats
path: root/media/audio/simple_sources.h
Commit message (Collapse)AuthorAgeFilesLines
* Move media/audio files into media namespace (relanding)vrk@google.com2012-04-031-1/+5
| | | | | | | | | | BUG=115187 TEST=compiles and runs without breaking audio tag; media_unittests, content_unittests TBR=scherkus,jam Review URL: https://chromiumcodereview.appspot.com/9968054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130288 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 130180 - Move media/audio files into media namespacevrk@google.com2012-04-021-5/+1
| | | | | | | | | | | | BUG=115187 TEST=compiles and runs without breaking audio tag; media_unittests, content_unittests Review URL: https://chromiumcodereview.appspot.com/9805001 TBR=vrk@google.com Review URL: https://chromiumcodereview.appspot.com/9965076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130182 0039d316-1c4b-4281-b951-d872f2087c98
* Move media/audio files into media namespacevrk@google.com2012-04-021-1/+5
| | | | | | | | | BUG=115187 TEST=compiles and runs without breaking audio tag; media_unittests, content_unittests Review URL: https://chromiumcodereview.appspot.com/9805001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130180 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes rounding issue in simple sources.henrika@chromium.org2011-11-291-0/+1
| | | | | | | | | | | The SimpleSources unit test failed after this CL (http://codereview.chromium.org/8678012). This CL contains a fix. BUG=none TEST=media_unittests --gtest_filter=SimpleSources* Review URL: http://codereview.chromium.org/8687024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111913 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 111890 - This patch ensures that the audio_output_win_unittest works ↵henrika@chromium.org2011-11-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | for AUDIO_PCM_LOW_LATENCY. It seems like only test which utilized AUDIO_PCM_LOW_LATENCY has been broken for a while. It was most likely I who broke it when I added support for WASAPI output. Anyhow, in this patch, I ensure that we can still test using the low-larency flag. A buffer size of 10ms is used on Vista and higher (<=> WASAPI) and 50ms is used (as before) in XP. I have also modified the sinus source since it contained two issues actually. 1) It did not store a valid state between each frame (=> distorsion at end-points). 2) The volume 2^15 was too high and could lead to odd effects for negative numbers. Both these things are fixed in this CL and all tones now sounds better. The old tones were all distorted. BUG=none TEST=audio_output_win_unittest Review URL: http://codereview.chromium.org/8678012 TBR=henrika@chromium.org Review URL: http://codereview.chromium.org/8725027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111892 0039d316-1c4b-4281-b951-d872f2087c98
* This patch ensures that the audio_output_win_unittest works for ↵henrika@chromium.org2011-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | AUDIO_PCM_LOW_LATENCY. It seems like only test which utilized AUDIO_PCM_LOW_LATENCY has been broken for a while. It was most likely I who broke it when I added support for WASAPI output. Anyhow, in this patch, I ensure that we can still test using the low-larency flag. A buffer size of 10ms is used on Vista and higher (<=> WASAPI) and 50ms is used (as before) in XP. I have also modified the sinus source since it contained two issues actually. 1) It did not store a valid state between each frame (=> distorsion at end-points). 2) The volume 2^15 was too high and could lead to odd effects for negative numbers. Both these things are fixed in this CL and all tones now sounds better. The old tones were all distorted. BUG=none TEST=audio_output_win_unittest Review URL: http://codereview.chromium.org/8678012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111890 0039d316-1c4b-4281-b951-d872f2087c98
* Add OVERRIDE to media/.avi@chromium.org2011-11-161-7/+9
| | | | | | | | | BUG=104314 TEST=no change Review URL: http://codereview.chromium.org/8520033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110304 0039d316-1c4b-4281-b951-d872f2087c98
* Create media.dll / libmedia.so.darin@chromium.org2011-08-291-3/+4
| | | | | | | | | This is a re-attempt at landing http://codereview.chromium.org/7572040, now with a DEPS roll to pick up the changes made to ffmpeg by http://codereview.chromium.org/7778004/ so that media_unittests run properly on Linux. TBR=fischman Review URL: http://codereview.chromium.org/7775004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98600 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r95841 due to failing media_unittests on linux_shared bot.darin@chromium.org2011-08-081-4/+3
| | | | | | | TBR=fischman@chromium.org Review URL: http://codereview.chromium.org/7601002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95846 0039d316-1c4b-4281-b951-d872f2087c98
* Enable media.dll / libmedia.so.darin@chromium.org2011-08-081-3/+4
| | | | | | Review URL: http://codereview.chromium.org/7572040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95841 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 95496 - Create media.dllapatrick@chromium.org2011-08-051-4/+3
| | | | | | | | | Review URL: http://codereview.chromium.org/7523051 TBR=darin@chromium.org Review URL: http://codereview.chromium.org/7491048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95561 0039d316-1c4b-4281-b951-d872f2087c98
* Create media.dlldarin@chromium.org2011-08-041-3/+4
| | | | | | Review URL: http://codereview.chromium.org/7523051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95496 0039d316-1c4b-4281-b951-d872f2087c98
* Fix media code to use initializer-list style for inheritance.scherkus@chromium.org2011-07-181-3/+4
| | | | | | Review URL: http://codereview.chromium.org/7400013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92826 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 9)thestig@chromium.org2010-11-201-2/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/5091005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66873 0039d316-1c4b-4281-b951-d872f2087c98
* Simplified AudioOutputStream interface.sergeyu@chromium.org2010-11-111-2/+0
| | | | | | | | | | | | | 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
* Add AudioBuffersState struct. Use it for audio synchronization.sergeyu@chromium.org2010-09-291-4/+5
| | | | | | | | | | | | | 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
* Rename a header and some methods to make way for subsequent audio recording ↵satish@chromium.org2010-07-121-1/+1
| | | | | | | | | | | | | 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
* AudioController to perform audio operations on a separate threadhclam@chromium.org2010-06-071-3/+2
| | | | | | | | | | | | | | | Added AudioController as a wrapper over AudioOutputStream to operate methods of AudioOutputStream on a separate thread managed by AudioController. This way most of the audio operations will be non-blocking. Next step is to modify AudioRendererHost to use AudioController. TEST=media_unittests --gtest_filter=AudioControllerTest.* BUG=39885 Review URL: http://codereview.chromium.org/2477005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49079 0039d316-1c4b-4281-b951-d872f2087c98
* Removed PushSource::Packet. SeekableBuffer.current_time() fixed to returnsergeyu@chromium.org2010-05-261-12/+4
| | | | | | | | | | kInvalidTimestamp when the time is unknown. TEST=media_unittests BUG=28654 Review URL: http://codereview.chromium.org/2140001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48329 0039d316-1c4b-4281-b951-d872f2087c98
* Flush audio data after seekhclam@chromium.org2010-04-081-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-051-14/+14
| | | | | | | 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
* Providing unplayed bytes in audio hardware bufferhclam@chromium.org2009-08-241-4/+4
| | | | | | | | | | | | | | | | | 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
* Allow PushSource to have smaller write size than read size (packet size)hclam@chromium.org2009-06-041-1/+3
| | | | | | | | | | The change actually supports arbitrary write size but write size greater than read size (packet size) is prohibited by an explicit check. Review URL: http://codereview.chromium.org/118170 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17686 0039d316-1c4b-4281-b951-d872f2087c98
* Non blocking audio sourcecpu@google.com2009-05-231-4/+61
| | | | | | | | | | | | | | - New interface PushAudioOutput for push model source - New adapter class PushSource which converts from pull model to push model - A test audio file (made by me using freeware program WavePad) - A new test TEST=unit test included. Review URL: http://codereview.chromium.org/115223 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16825 0039d316-1c4b-4281-b951-d872f2087c98
* A simple tone source useful for testing and troubleshootingcpu@google.com2009-01-051-0/+40
- Only windows 16 PCM mono implementation so far. Review URL: http://codereview.chromium.org/16226 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7557 0039d316-1c4b-4281-b951-d872f2087c98