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

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

Issue 2004283002: AudioConverter: Express delay in frames rather than msec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed files & removed rounding Created 4 years, 7 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
« no previous file with comments | « media/audio/virtual_audio_input_stream.cc ('k') | media/audio/virtual_audio_output_stream.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_VIRTUAL_AUDIO_OUTPUT_STREAM_H_ 5 #ifndef MEDIA_AUDIO_VIRTUAL_AUDIO_OUTPUT_STREAM_H_
6 #define MEDIA_AUDIO_VIRTUAL_AUDIO_OUTPUT_STREAM_H_ 6 #define MEDIA_AUDIO_VIRTUAL_AUDIO_OUTPUT_STREAM_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/threading/thread_checker.h" 10 #include "base/threading/thread_checker.h"
(...skipping 29 matching lines...) Expand all
40 // AudioOutputStream: 40 // AudioOutputStream:
41 bool Open() override; 41 bool Open() override;
42 void Start(AudioSourceCallback* callback) override; 42 void Start(AudioSourceCallback* callback) override;
43 void Stop() override; 43 void Stop() override;
44 void SetVolume(double volume) override; 44 void SetVolume(double volume) override;
45 void GetVolume(double* volume) override; 45 void GetVolume(double* volume) override;
46 void Close() override; 46 void Close() override;
47 47
48 private: 48 private:
49 // AudioConverter::InputCallback: 49 // AudioConverter::InputCallback:
50 double ProvideInput(AudioBus* audio_bus, 50 double ProvideInput(AudioBus* audio_bus, uint32_t frames_delayed) override;
51 base::TimeDelta buffer_delay) override;
52 51
53 const AudioParameters params_; 52 const AudioParameters params_;
54 // Pointer to the VirtualAudioInputStream to attach to when Start() is called. 53 // Pointer to the VirtualAudioInputStream to attach to when Start() is called.
55 // This pointer should always be valid because VirtualAudioInputStream should 54 // This pointer should always be valid because VirtualAudioInputStream should
56 // outlive this class. 55 // outlive this class.
57 VirtualAudioInputStream* const target_input_stream_; 56 VirtualAudioInputStream* const target_input_stream_;
58 57
59 AfterCloseCallback after_close_cb_; 58 AfterCloseCallback after_close_cb_;
60 59
61 AudioSourceCallback* callback_; 60 AudioSourceCallback* callback_;
62 double volume_; 61 double volume_;
63 62
64 base::ThreadChecker thread_checker_; 63 base::ThreadChecker thread_checker_;
65 64
66 DISALLOW_COPY_AND_ASSIGN(VirtualAudioOutputStream); 65 DISALLOW_COPY_AND_ASSIGN(VirtualAudioOutputStream);
67 }; 66 };
68 67
69 } // namespace media 68 } // namespace media
70 69
71 #endif // MEDIA_AUDIO_VIRTUAL_AUDIO_OUTPUT_STREAM_H_ 70 #endif // MEDIA_AUDIO_VIRTUAL_AUDIO_OUTPUT_STREAM_H_
OLDNEW
« no previous file with comments | « media/audio/virtual_audio_input_stream.cc ('k') | media/audio/virtual_audio_output_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698