Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: media/audio/win/waveout_output_win.h

Issue 357004: SetVolume and GetVolume take one volume instead of separate left and right vo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/audio/win/audio_output_win_unittest.cc ('k') | media/audio/win/waveout_output_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_AUDIO_WIN_WAVEOUT_OUTPUT_WIN_H_ 5 #ifndef MEDIA_AUDIO_WIN_WAVEOUT_OUTPUT_WIN_H_
6 #define MEDIA_AUDIO_WIN_WAVEOUT_OUTPUT_WIN_H_ 6 #define MEDIA_AUDIO_WIN_WAVEOUT_OUTPUT_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <mmsystem.h> 9 #include <mmsystem.h>
10 10
(...skipping 20 matching lines...) Expand all
31 PCMWaveOutAudioOutputStream(AudioManagerWin* manager, 31 PCMWaveOutAudioOutputStream(AudioManagerWin* manager,
32 int channels, int sampling_rate, 32 int channels, int sampling_rate,
33 char bits_per_sample, UINT device_id); 33 char bits_per_sample, UINT device_id);
34 virtual ~PCMWaveOutAudioOutputStream(); 34 virtual ~PCMWaveOutAudioOutputStream();
35 35
36 // Implementation of AudioOutputStream. 36 // Implementation of AudioOutputStream.
37 virtual bool Open(size_t packet_size); 37 virtual bool Open(size_t packet_size);
38 virtual void Close(); 38 virtual void Close();
39 virtual void Start(AudioSourceCallback* callback); 39 virtual void Start(AudioSourceCallback* callback);
40 virtual void Stop(); 40 virtual void Stop();
41 virtual void SetVolume(double left_level, double right_level); 41 virtual void SetVolume(double volume);
42 virtual void GetVolume(double* left_level, double* right_level); 42 virtual void GetVolume(double* volume);
43 43
44 // Sends a buffer to the audio driver for playback. 44 // Sends a buffer to the audio driver for playback.
45 void QueueNextPacket(WAVEHDR* buffer); 45 void QueueNextPacket(WAVEHDR* buffer);
46 46
47 private: 47 private:
48 enum State { 48 enum State {
49 PCMA_BRAND_NEW, // Initial state. 49 PCMA_BRAND_NEW, // Initial state.
50 PCMA_READY, // Device obtained and ready to play. 50 PCMA_READY, // Device obtained and ready to play.
51 PCMA_PLAYING, // Playing audio. 51 PCMA_PLAYING, // Playing audio.
52 PCMA_STOPPING, // Trying to stop, waiting for callback to finish. 52 PCMA_STOPPING, // Trying to stop, waiting for callback to finish.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 WAVEHDR* buffer_; 106 WAVEHDR* buffer_;
107 107
108 // An event that is signaled when the callback thread is ready to stop. 108 // An event that is signaled when the callback thread is ready to stop.
109 ScopedHandle stopped_event_; 109 ScopedHandle stopped_event_;
110 110
111 DISALLOW_COPY_AND_ASSIGN(PCMWaveOutAudioOutputStream); 111 DISALLOW_COPY_AND_ASSIGN(PCMWaveOutAudioOutputStream);
112 }; 112 };
113 113
114 #endif // MEDIA_AUDIO_WIN_WAVEOUT_OUTPUT_WIN_H_ 114 #endif // MEDIA_AUDIO_WIN_WAVEOUT_OUTPUT_WIN_H_
115 115
OLDNEW
« no previous file with comments | « media/audio/win/audio_output_win_unittest.cc ('k') | media/audio/win/waveout_output_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698