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/cras/cras_input.h

Issue 645923002: Add support for audio input mute detection on all platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 6 years, 2 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/audio_io.h ('k') | media/audio/cras/cras_input.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_CRAS_CRAS_INPUT_H_ 5 #ifndef MEDIA_AUDIO_CRAS_CRAS_INPUT_H_
6 #define MEDIA_AUDIO_CRAS_CRAS_INPUT_H_ 6 #define MEDIA_AUDIO_CRAS_CRAS_INPUT_H_
7 7
8 #include <cras_client.h> 8 #include <cras_client.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 22 matching lines...) Expand all
33 virtual ~CrasInputStream(); 33 virtual ~CrasInputStream();
34 34
35 // Implementation of AudioInputStream. 35 // Implementation of AudioInputStream.
36 virtual bool Open() override; 36 virtual bool Open() override;
37 virtual void Start(AudioInputCallback* callback) override; 37 virtual void Start(AudioInputCallback* callback) override;
38 virtual void Stop() override; 38 virtual void Stop() override;
39 virtual void Close() override; 39 virtual void Close() override;
40 virtual double GetMaxVolume() override; 40 virtual double GetMaxVolume() override;
41 virtual void SetVolume(double volume) override; 41 virtual void SetVolume(double volume) override;
42 virtual double GetVolume() override; 42 virtual double GetVolume() override;
43 virtual bool IsMuted() override;
43 44
44 private: 45 private:
45 // Handles requests to get samples from the provided buffer. This will be 46 // Handles requests to get samples from the provided buffer. This will be
46 // called by the audio server when it has samples ready. 47 // called by the audio server when it has samples ready.
47 static int SamplesReady(cras_client* client, 48 static int SamplesReady(cras_client* client,
48 cras_stream_id_t stream_id, 49 cras_stream_id_t stream_id,
49 uint8* samples, 50 uint8* samples,
50 size_t frames, 51 size_t frames,
51 const timespec* sample_ts, 52 const timespec* sample_ts,
52 void* arg); 53 void* arg);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 const CRAS_STREAM_DIRECTION stream_direction_; 100 const CRAS_STREAM_DIRECTION stream_direction_;
100 101
101 scoped_ptr<AudioBus> audio_bus_; 102 scoped_ptr<AudioBus> audio_bus_;
102 103
103 DISALLOW_COPY_AND_ASSIGN(CrasInputStream); 104 DISALLOW_COPY_AND_ASSIGN(CrasInputStream);
104 }; 105 };
105 106
106 } // namespace media 107 } // namespace media
107 108
108 #endif // MEDIA_AUDIO_CRAS_CRAS_INPUT_H_ 109 #endif // MEDIA_AUDIO_CRAS_CRAS_INPUT_H_
OLDNEW
« no previous file with comments | « media/audio/audio_io.h ('k') | media/audio/cras/cras_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698