| OLD | NEW |
| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 // We use the callback mostly to periodically request more audio data. | 80 // We use the callback mostly to periodically request more audio data. |
| 81 AudioSourceCallback* callback_; | 81 AudioSourceCallback* callback_; |
| 82 | 82 |
| 83 // The size in bytes of each audio buffer, we usually have two of these. | 83 // The size in bytes of each audio buffer, we usually have two of these. |
| 84 size_t buffer_size_; | 84 size_t buffer_size_; |
| 85 | 85 |
| 86 // Volume level from 0 to 1. | 86 // Volume level from 0 to 1. |
| 87 float volume_; | 87 float volume_; |
| 88 | 88 |
| 89 // Channels from 0 to 6. |
| 90 int channels_; |
| 91 |
| 89 // The id assigned by the operating system to the selected wave output | 92 // The id assigned by the operating system to the selected wave output |
| 90 // hardware device. Usually this is just -1 which means 'default device'. | 93 // hardware device. Usually this is just -1 which means 'default device'. |
| 91 UINT device_id_; | 94 UINT device_id_; |
| 92 | 95 |
| 93 // Windows native structure to encode the format parameters. | 96 // Windows native structure to encode the format parameters. |
| 94 WAVEFORMATEX format_; | 97 WAVEFORMATEX format_; |
| 95 | 98 |
| 96 // Handle to the instance of the wave device. | 99 // Handle to the instance of the wave device. |
| 97 HWAVEOUT waveout_; | 100 HWAVEOUT waveout_; |
| 98 | 101 |
| 99 // Pointer to the first allocated audio buffer. This object owns it. | 102 // Pointer to the first allocated audio buffer. This object owns it. |
| 100 WAVEHDR* buffer_; | 103 WAVEHDR* buffer_; |
| 101 | 104 |
| 102 // An event that is signaled when the callback thread is ready to stop. | 105 // An event that is signaled when the callback thread is ready to stop. |
| 103 ScopedHandle stopped_event_; | 106 ScopedHandle stopped_event_; |
| 104 | 107 |
| 105 DISALLOW_COPY_AND_ASSIGN(PCMWaveOutAudioOutputStream); | 108 DISALLOW_COPY_AND_ASSIGN(PCMWaveOutAudioOutputStream); |
| 106 }; | 109 }; |
| 107 | 110 |
| 108 #endif // MEDIA_AUDIO_WIN_WAVEOUT_OUTPUT_WIN_H_ | 111 #endif // MEDIA_AUDIO_WIN_WAVEOUT_OUTPUT_WIN_H_ |
| 109 | 112 |
| OLD | NEW |