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

Side by Side Diff: media/audio/linux/alsa_output.cc

Issue 113923: Change default audio device from "plug:default" to "default". (Closed)
Patch Set: Capitlizing PCM, just for scherkus. Created 11 years, 6 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/linux/alsa_output.h ('k') | media/audio/linux/audio_manager_linux.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // The audio stream implementation is made difficult because different methods 5 // The audio stream implementation is made difficult because different methods
6 // are available for calling depending on what state the stream is. Here is the 6 // are available for calling depending on what state the stream is. Here is the
7 // state transition table for the stream. 7 // state transition table for the stream.
8 // 8 //
9 // STATE_CREATED -> Open() -> STATE_OPENED 9 // STATE_CREATED -> Open() -> STATE_OPENED
10 // STATE_OPENED -> Start() -> STATE_STARTED 10 // STATE_OPENED -> Start() -> STATE_STARTED
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // value would be. 62 // value would be.
63 static const unsigned int kTargetLatencyMicroseconds = 10000; 63 static const unsigned int kTargetLatencyMicroseconds = 10000;
64 64
65 // Minimal amount of time to sleep. If any future event is expected to 65 // Minimal amount of time to sleep. If any future event is expected to
66 // execute within this timeframe, treat it as if it should execute immediately. 66 // execute within this timeframe, treat it as if it should execute immediately.
67 // 67 //
68 // TODO(ajwong): Determine if there is a sensible minimum sleep resolution and 68 // TODO(ajwong): Determine if there is a sensible minimum sleep resolution and
69 // adjust accordingly. 69 // adjust accordingly.
70 static const int64 kMinSleepMilliseconds = 10L; 70 static const int64 kMinSleepMilliseconds = 10L;
71 71
72 const char* AlsaPCMOutputStream::kDefaultDevice = "plug:default"; 72 const char* AlsaPCMOutputStream::kDefaultDevice = "default";
73 73
74 AlsaPCMOutputStream::AlsaPCMOutputStream(const std::string& device_name, 74 AlsaPCMOutputStream::AlsaPCMOutputStream(const std::string& device_name,
75 int min_buffer_ms, 75 int min_buffer_ms,
76 AudioManager::Format format, 76 AudioManager::Format format,
77 int channels, 77 int channels,
78 int sample_rate, 78 int sample_rate,
79 char bits_per_sample) 79 char bits_per_sample)
80 : state_(STATE_CREATED), 80 : state_(STATE_CREATED),
81 device_name_(device_name), 81 device_name_(device_name),
82 playback_handle_(NULL), 82 playback_handle_(NULL),
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 NOTIMPLEMENTED(); 512 NOTIMPLEMENTED();
513 } 513 }
514 514
515 void AlsaPCMOutputStream::GetVolume(double* left_level, double* right_level) { 515 void AlsaPCMOutputStream::GetVolume(double* left_level, double* right_level) {
516 NOTIMPLEMENTED(); 516 NOTIMPLEMENTED();
517 } 517 }
518 518
519 size_t AlsaPCMOutputStream::GetNumBuffers() { 519 size_t AlsaPCMOutputStream::GetNumBuffers() {
520 return 0; 520 return 0;
521 } 521 }
OLDNEW
« no previous file with comments | « media/audio/linux/alsa_output.h ('k') | media/audio/linux/audio_manager_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698