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

Side by Side Diff: media/audio/audio_output_resampler.h

Issue 10830268: Allow audio system to handle synchronized low-latency audio I/O (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months 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/audio_output_proxy_unittest.cc ('k') | media/audio/audio_output_resampler.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_AUDIO_OUTPUT_RESAMPLER_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_
6 #define MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 virtual bool OpenStream() OVERRIDE; 47 virtual bool OpenStream() OVERRIDE;
48 virtual bool StartStream(AudioOutputStream::AudioSourceCallback* callback, 48 virtual bool StartStream(AudioOutputStream::AudioSourceCallback* callback,
49 AudioOutputProxy* stream_proxy) OVERRIDE; 49 AudioOutputProxy* stream_proxy) OVERRIDE;
50 virtual void StopStream(AudioOutputProxy* stream_proxy) OVERRIDE; 50 virtual void StopStream(AudioOutputProxy* stream_proxy) OVERRIDE;
51 virtual void StreamVolumeSet(AudioOutputProxy* stream_proxy, 51 virtual void StreamVolumeSet(AudioOutputProxy* stream_proxy,
52 double volume) OVERRIDE; 52 double volume) OVERRIDE;
53 virtual void CloseStream(AudioOutputProxy* stream_proxy) OVERRIDE; 53 virtual void CloseStream(AudioOutputProxy* stream_proxy) OVERRIDE;
54 virtual void Shutdown() OVERRIDE; 54 virtual void Shutdown() OVERRIDE;
55 55
56 // AudioSourceCallback interface. 56 // AudioSourceCallback interface.
57 virtual int OnMoreData(AudioBus* audio_bus, 57 virtual int OnMoreData(AudioBus* dest,
58 AudioBuffersState buffers_state) OVERRIDE; 58 AudioBuffersState buffers_state) OVERRIDE;
59 virtual int OnMoreIOData(AudioBus* source,
60 AudioBus* dest,
61 AudioBuffersState buffers_state) OVERRIDE;
59 virtual void OnError(AudioOutputStream* stream, int code) OVERRIDE; 62 virtual void OnError(AudioOutputStream* stream, int code) OVERRIDE;
60 virtual void WaitTillDataReady() OVERRIDE; 63 virtual void WaitTillDataReady() OVERRIDE;
61 64
62 private: 65 private:
63 friend class base::RefCountedThreadSafe<AudioOutputResampler>; 66 friend class base::RefCountedThreadSafe<AudioOutputResampler>;
64 virtual ~AudioOutputResampler(); 67 virtual ~AudioOutputResampler();
65 68
66 // Called by MultiChannelResampler when more data is necessary. 69 // Called by MultiChannelResampler when more data is necessary.
67 void ProvideInput(AudioBus* audio_bus); 70 void ProvideInput(AudioBus* audio_bus);
68 71
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // Total number of bytes (in terms of output parameters) stored in resampler 109 // Total number of bytes (in terms of output parameters) stored in resampler
107 // or FIFO buffers which have not been sent to the audio device. 110 // or FIFO buffers which have not been sent to the audio device.
108 int outstanding_audio_bytes_; 111 int outstanding_audio_bytes_;
109 112
110 DISALLOW_COPY_AND_ASSIGN(AudioOutputResampler); 113 DISALLOW_COPY_AND_ASSIGN(AudioOutputResampler);
111 }; 114 };
112 115
113 } // namespace media 116 } // namespace media
114 117
115 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_ 118 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_RESAMPLER_H_
OLDNEW
« no previous file with comments | « media/audio/audio_output_proxy_unittest.cc ('k') | media/audio/audio_output_resampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698