diff options
author | fbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-23 22:56:35 +0000 |
---|---|---|
committer | fbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-23 22:56:35 +0000 |
commit | 32a61d0268edcef77e2d4300c9287414ecc52fe6 (patch) | |
tree | fcae08e54b86ecf58686150a6b0a60a2368ef766 /media/audio | |
parent | 1ed60a369d47c7fce9a92d52513486960f63506d (diff) | |
download | chromium_src-32a61d0268edcef77e2d4300c9287414ecc52fe6.zip chromium_src-32a61d0268edcef77e2d4300c9287414ecc52fe6.tar.gz chromium_src-32a61d0268edcef77e2d4300c9287414ecc52fe6.tar.bz2 |
Prototype audio time shift.
Review URL: http://codereview.chromium.org/92007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14366 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio')
-rw-r--r-- | media/audio/win/waveout_output_win.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/media/audio/win/waveout_output_win.cc b/media/audio/win/waveout_output_win.cc index 9a3f581..2f5d8ab 100644 --- a/media/audio/win/waveout_output_win.cc +++ b/media/audio/win/waveout_output_win.cc @@ -218,8 +218,8 @@ void PCMWaveOutAudioOutputStream::GetVolume(double* left_level, HandleError(res); return; } - *left_level = double(LOWORD(volume_packed)) / kMaxVolumeLevel; - *right_level = double(HIWORD(volume_packed)) / kMaxVolumeLevel; + *left_level = static_cast<double>(LOWORD(volume_packed)) / kMaxVolumeLevel; + *right_level = static_cast<double>(HIWORD(volume_packed)) / kMaxVolumeLevel; } size_t PCMWaveOutAudioOutputStream::GetNumBuffers() { @@ -234,6 +234,7 @@ void PCMWaveOutAudioOutputStream::HandleError(MMRESULT error) { void PCMWaveOutAudioOutputStream::QueueNextPacket(WAVEHDR *buffer) { // Call the source which will fill our buffer with pleasant sounds and // return to us how many bytes were used. + // TODO(fbarchard): Handle used 0 by queueing more. size_t used = callback_->OnMoreData(this, buffer->lpData, buffer_size_); if (used <= buffer_size_) { buffer->dwBufferLength = used; |