summaryrefslogtreecommitdiffstats
path: root/media/audio
Commit message (Collapse)AuthorAgeFilesLines
* AudioRendererHost send ViewMsg_AudioStreamStatehclam@chromium.org2009-08-111-9/+0
| | | | | | | | | | | | | AudioRendererHost should use ViewMsg_AudioStreamState to notify renderer of its state instead of AudioOutputStream::State. The enum of AudioOutputStream::State is not used anywhere, thus removed. TEST=unit_tests --gtest_filter=Audio* Review URL: http://codereview.chromium.org/165255 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23061 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a leak in AudioRendererBaseTest::OneCompleteReadCyclehclam@chromium.org2009-08-061-1/+2
| | | | | | | | | | | | | | | | We should a local reference of the input buffer, so that buffer gets cleanup after it is out of scope. Also disabled AudioUtilTest.FoldChannels_s16_benchmark because it is running too long. It shold be run locally instead of on the build bots. TEST=media_unittests --gtest_filter=AudioRendererBaseTest.OneCompleteReadCycle TBR=scherkus Review URL: http://codereview.chromium.org/165087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22671 0039d316-1c4b-4281-b951-d872f2087c98
* Reimplement the AlsaPcmOutputStream and fix the threading issues.ajwong@chromium.org2009-08-048-512/+1136
| | | | | | | | Changes the threading model from one thread per stream to one shared thread. Also, redoes the alsa reading/buffering logic to assume an asynchronous data source, and respect the different packet sizes. The Alsa device is set to non-blocking now. State transitions are cleaned up, and the threading semantics are reworked. Now linux audio will no longer crash on shutdown, seek, pause, or tab close. This implementation does still leak though. :( The leak will be fixed in another CL. Review URL: http://codereview.chromium.org/160497 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22414 0039d316-1c4b-4281-b951-d872f2087c98
* Surround Sound handling by folding 5 channels down to stereo.fbarchard@chromium.org2009-07-255-5/+207
| | | | | | | | | 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
* Software volume control hook-up in linux.ajwong@chromium.org2009-07-252-3/+14
| | | | | | | | | BUG=17709 TEST=None Review URL: http://codereview.chromium.org/159380 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21602 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring to share MockAudioOutputStream implementations across 3 platformshclam@google.com2009-07-2218-191/+189
| | | | | | | | | | | | | 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-2117-188/+190
| | | | | | | | 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-2117-190/+188
| | | | | | 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-205-26/+178
| | | | | | | | | 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
* Changing overstrict CHECKs to just setting the object into an invalid state.ajwong@chromium.org2009-06-201-5/+17
| | | | | | | | BUG: 13287 Review URL: http://codereview.chromium.org/140033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18882 0039d316-1c4b-4281-b951-d872f2087c98
* Setting svn:eol-style LF for media source files.scherkus@chromium.org2009-06-174-78/+79
| | | | | | | | | | | Removed some trailing whitespace as well and fixed some style nits. No code change. TEST=none BUG=none TBR=hclam Review URL: http://codereview.chromium.org/125225 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18577 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
* Fix build bustage due to media_testshclam@chromium.org2009-06-042-44/+45
| | | | | | | | | | | | It's not the right time to move SineWaveAudioSource to a common unit test yet since linux doesn't have mock audio stream implemented. TBR=cpu, willchan Review URL: http://codereview.chromium.org/118286 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17691 0039d316-1c4b-4281-b951-d872f2087c98
* Allow PushSource to have smaller write size than read size (packet size)hclam@chromium.org2009-06-044-56/+132
| | | | | | | | | | 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
* Change default audio device from "plug:default" to "default".ajwong@chromium.org2009-05-273-4/+5
| | | | | | Review URL: http://codereview.chromium.org/113923 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17040 0039d316-1c4b-4281-b951-d872f2087c98
* Non blocking audio sourcecpu@google.com2009-05-233-6/+241
| | | | | | | | | | | | | | - 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
* Third attempt at http://codereview.chromium.org/115276ajwong@chromium.org2009-05-215-4/+790
| | | | | | Review URL: http://codereview.chromium.org/115645 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16639 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r16622estade@chromium.org2009-05-215-790/+4
| | | | | | | | TBR=ajwong Review URL: http://codereview.chromium.org/115641 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16626 0039d316-1c4b-4281-b951-d872f2087c98
* Reapply http://codereview.chromium.org/115276ajwong@chromium.org2009-05-215-4/+790
| | | | | | Review URL: http://codereview.chromium.org/115638 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16622 0039d316-1c4b-4281-b951-d872f2087c98
* Revert http://codereview.chromium.org/115276ajwong@chromium.org2009-05-215-790/+4
| | | | | | Review URL: http://codereview.chromium.org/115624 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16584 0039d316-1c4b-4281-b951-d872f2087c98
* This iteration creates one message loop per audio output stream that is ↵ajwong@chromium.org2009-05-215-4/+790
| | | | | | | | responsible for buffering data from the data source, and writing the buffers to the output device. This design blocks while waiting for data to be retrieved from the data source, which can lead to unnecessary buffer underruns in the audio device. This will be solved later after the non-blocking AudioSource interface is written. Review URL: http://codereview.chromium.org/115276 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16583 0039d316-1c4b-4281-b951-d872f2087c98
* Third installement of low level audio for maccpu@chromium.org2009-04-302-14/+130
| | | | | | | | | | | - Finally audio playback wired - Takes into account initial buffer fill change of last week - Two 'can you hear this?' unit tests added Review URL: http://codereview.chromium.org/92131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15017 0039d316-1c4b-4281-b951-d872f2087c98
* Prototype audio time shift.fbarchard@chromium.org2009-04-231-2/+3
| | | | | | Review URL: http://codereview.chromium.org/92007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14366 0039d316-1c4b-4281-b951-d872f2087c98
* Windows low level audio small changescpu@google.com2009-04-162-17/+99
| | | | | | | | | | | - A fix to reported deadlock: don't start the real-time thread until the inital buffers are filled - A new unitest that uses a slow source, the idea is to try to repro the deadlock - Implements GetVolume and SetVolume Review URL: http://codereview.chromium.org/67154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13856 0039d316-1c4b-4281-b951-d872f2087c98
* Second part of the low level audio for Maccpu@chromium.org2009-04-145-67/+145
| | | | | | | | | | | -Fixed leaks (audiomanager singleton, audiostream) -Moved simple_sources to be common for all platforms -Added trivial check for sinesource -Added some logic on the audio callback, not used yet Review URL: http://codereview.chromium.org/67058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13713 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some threading issues and some refactoring in AudioRendererHosthclam@chromium.org2009-04-076-8/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. AudioRendererHost should not wait on IO thread. Calling AudioOutputStream::Start requests some audio packets by calling IPCAudioSource::OnMoreData, resulting in a deadlock. I implemented a prefetching logic to solve this problem, source has to know how many internal buffers the implementation of AudioOutputStream is using and prepare the same amount of packets before calling AudioOutputStream::Start. 2. When IPCAudioSource::OnMoreData is waiting for packet to arrive, calling AudioOutputStream::Stop will result in a deadlock since it expects OnMoreData to return. Should wake up all waiting threads before calling AudioOutputStream::Stop. 3. Did some refactoring and move the message handlers completely into AudioRendererHost, it was clumsy to call to AudioRendererHost from ResourceMessageFilter. Also moved all logics of using shared memory for packet passing, prefetching to IPCAudioSource. AudioRendererHost is now merely a container that manages and delegates calls to IPCAudioSource. This refactoring is helpful because the next step is to implement standalone IPC channel for audio. Review URL: http://codereview.chromium.org/57023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13288 0039d316-1c4b-4281-b951-d872f2087c98
* First part of the Mac Audio low level supportcpu@chromium.org2009-03-254-4/+278
| | | | | | | | | | | - Basic factory support for 16 PCM audio - Adds PCM audio using Queue Services - Many functions not implemented, trying to keep CLs to a decent size - Added two unit tests Review URL: http://codereview.chromium.org/42494 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12431 0039d316-1c4b-4281-b951-d872f2087c98
* Revert tree bustage cause by r11904.hclam@chromium.org2009-03-175-6/+0
| | | | | | TBR=agl git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11906 0039d316-1c4b-4281-b951-d872f2087c98
* andrew's patchhclam@chromium.org2009-03-175-0/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11904 0039d316-1c4b-4281-b951-d872f2087c98
* Remove logging.h from cc files that don't use it.thestig@chromium.org2009-03-121-1/+0
| | | | | | Review URL: http://codereview.chromium.org/42155 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11593 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-115-5/+0
| | | | | | | | | Normalize end of file newlines in build/ media/ printing/ testing/ and tools/. All files end in a single newline. Review URL: http://codereview.chromium.org/43082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11449 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes CRLF and trailing white spaces.maruel@chromium.org2009-03-051-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
* Random change to force a build. Fix style compliance. In theory, shouldn't ↵maruel@chromium.org2009-03-021-2/+2
| | | | | | | | | break the build. TBR=cpy Review URL: http://codereview.chromium.org/27331 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10701 0039d316-1c4b-4281-b951-d872f2087c98
* Add destruction to AudioManager singleton for windowscpu@google.com2009-02-242-6/+14
| | | | | | | | | -Current unit tests sufice Review URL: http://codereview.chromium.org/28036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10248 0039d316-1c4b-4281-b951-d872f2087c98
* Audio related IPC messages and handlers from browser tohclam@chromium.org2009-02-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | renderer 1. Added 4 IPC messages and corresponding handlers for audio: - RequestAudioPacket(int stream_id) Browser process is hungry for audio packet, notify renderer process to provide more. - NotifyAudioStreamCreated(int stream_id, SharedMemoryHandler buffer, int len) Notify stream created event and provide buffer for filling in the future. - NotifyAudioStreamStateChanged(int stream_id, enum state, nt info) The internal state of the audio stream has chagned, notify renderer process of the change. int info provides additional information of the change, e.g. platform specific error code. - NotifyAudioStreamVolume(int stream_id, double left, double right) Notify the current volume for the audio stream. 2. Added methods to RenderView for creating audio streams and delegate audio related requests to browser process with IPC. Now the registration and bookkeeping of AudioRendererImpl happens in RenderView (see audio_renderers_). The reason being that the code is almost just an base::IDMap that doesn't worth creating a new class. Review URL: http://codereview.chromium.org/20410 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10078 0039d316-1c4b-4281-b951-d872f2087c98
* IPC messages definitions for audio related requests fromhclam@chromium.org2009-02-161-3/+5
| | | | | | | | | | | | renderer to browser. Defined IPC messages that maps to methods exposed by AudioRendererHost that serves audio related requests. Also with handlers in ResourceMessageFilter for the newly added IPC messages. Review URL: http://codereview.chromium.org/21340 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9864 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r9861 to fix buildhclam@chromium.org2009-02-161-5/+3
| | | | | | | | TBR=? Review URL: http://codereview.chromium.org/21399 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9862 0039d316-1c4b-4281-b951-d872f2087c98
* IPC messages definitions for audio related requests fromhclam@chromium.org2009-02-161-3/+5
| | | | | | | | | | | | renderer to browser. Defined IPC messages that maps to methods exposed by AudioRendererHost that serves audio related requests. Also with handlers in ResourceMessageFilter for the newly added IPC messages. Review URL: http://codereview.chromium.org/21340 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9861 0039d316-1c4b-4281-b951-d872f2087c98
* Construct AudioRendererHost in BrowserRendererProcessHost, also constructhclam@chromium.org2009-02-113-0/+22
| | | | | | | | ResourceMessageFilter with pointer to it so we can delegate requests to it from IPC later. Review URL: http://codereview.chromium.org/20131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9551 0039d316-1c4b-4281-b951-d872f2087c98
* Do not runsome PCM audio tests on the botscpu@google.com2009-01-192-3/+25
| | | | | | | | | | | | | | - They are flaky when somebody RDPs into the bots. The system somehow installs an audio device on the fly that goes bad. - I think this is the issue as well on the trybots TBR=nsylvain Review URL: http://codereview.chromium.org/18197 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8272 0039d316-1c4b-4281-b951-d872f2087c98
* Testing to determine why some trybots have issues with some PCMWave testing.cpu@google.com2009-01-171-2/+3
| | | | | | | | TBR=maruel Review URL: http://codereview.chromium.org/18188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8254 0039d316-1c4b-4281-b951-d872f2087c98
* Re-enable the audio tests that fail in the botscpu@google.com2009-01-144-4/+24
| | | | | | | | | - Basically skip some tests if the OS reports there is no audio device. Review URL: http://codereview.chromium.org/16811 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8047 0039d316-1c4b-4281-b951-d872f2087c98
* disable failing media unit teststc@google.com2009-01-141-4/+4
| | | | | | | | | | these don't work on my machine either TBR=cpu Review URL: http://codereview.chromium.org/18039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8000 0039d316-1c4b-4281-b951-d872f2087c98
* Low level windows audio support (part 2 of 2)cpu@google.com2009-01-133-9/+569
| | | | | | | | | | | | | - Implementation using the WaveXXXX windows API - Unit tests for the implementation and for the previous CL that had the sine wave simple source. This is the harder one :) I tried to add comments to illuminate the thinking. Review URL: http://codereview.chromium.org/17403 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7988 0039d316-1c4b-4281-b951-d872f2087c98
* Low level windows audio support (part 1 of 2)cpu@google.com2009-01-133-33/+125
| | | | | | | | | | | | | - Windows specific changes to AudioManager Allows testing for mock streams This this the first part of the code that adds support for audio using waveXXX API. Since is relatively lot of code I will do two CLs, unfortunately the complexity is not evenly split. Review URL: http://codereview.chromium.org/17401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7987 0039d316-1c4b-4281-b951-d872f2087c98
* A simple tone source useful for testing and troubleshootingcpu@google.com2009-01-052-0/+83
| | | | | | | | - 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
* Audio support drop 2cpu@google.com2008-12-203-1/+157
| | | | | | | | | | | - First part of Windows mock stream support - Windows unittests Scons modifications will come next Review URL: http://codereview.chromium.org/15087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7341 0039d316-1c4b-4281-b951-d872f2087c98
* Same as 14820 but moved into media foldercpu@google.com2008-12-181-0/+135
- Low level audio interface for 'raw' formats - Upcomming windows implementation Review URL: http://codereview.chromium.org/15047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7254 0039d316-1c4b-4281-b951-d872f2087c98