summaryrefslogtreecommitdiffstats
path: root/media/midi
diff options
context:
space:
mode:
authortoyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-15 08:46:18 +0000
committertoyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-15 08:46:18 +0000
commit73113403b7d0fa04308689ebc79e765f65a3efad (patch)
treea2481e7727ecd9485aa90569796fa60bb98ebb9b /media/midi
parent10bea7665dbb4cdf21ac28b1a8b70848864820ed (diff)
downloadchromium_src-73113403b7d0fa04308689ebc79e765f65a3efad.zip
chromium_src-73113403b7d0fa04308689ebc79e765f65a3efad.tar.gz
chromium_src-73113403b7d0fa04308689ebc79e765f65a3efad.tar.bz2
Web MIDI: enable important logs in release build
To investigate a reason that Web MIDI goes not working recently in ChromeOS, this change enable some important log messages in release build. Also, this change make it impossible to disable MIDIManager for ChromeOS. BUG=335865 Review URL: https://codereview.chromium.org/166033004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251564 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/midi')
-rw-r--r--media/midi/midi_manager.cc5
-rw-r--r--media/midi/midi_manager_alsa.cc10
2 files changed, 8 insertions, 7 deletions
diff --git a/media/midi/midi_manager.cc b/media/midi/midi_manager.cc
index 4447a05..da5de7f 100644
--- a/media/midi/midi_manager.cc
+++ b/media/midi/midi_manager.cc
@@ -6,13 +6,14 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/logging.h"
namespace media {
#if !defined(OS_MACOSX) && !defined(OS_WIN) && !defined(USE_ALSA) && \
- !defined(OS_ANDROID)
-// TODO(toyoshim): implement MidiManager for other platforms.
+ !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
MidiManager* MidiManager::Create() {
+ LOG(ERROR) << "Platform specific MIDIManager is not implemented.";
return new MidiManager;
}
#endif
diff --git a/media/midi/midi_manager_alsa.cc b/media/midi/midi_manager_alsa.cc
index 4716db2..e91cae8 100644
--- a/media/midi/midi_manager_alsa.cc
+++ b/media/midi/midi_manager_alsa.cc
@@ -145,12 +145,12 @@ bool MidiManagerAlsa::Initialize() {
snd_ctl_t* handle;
int err = snd_ctl_open(&handle, id.c_str(), 0);
if (err != 0) {
- DLOG(ERROR) << "snd_ctl_open fails: " << snd_strerror(err);
+ LOG(ERROR) << "snd_ctl_open fails: " << snd_strerror(err);
continue;
}
err = snd_ctl_card_info(handle, card);
if (err != 0) {
- DLOG(ERROR) << "snd_ctl_card_info fails: " << snd_strerror(err);
+ LOG(ERROR) << "snd_ctl_card_info fails: " << snd_strerror(err);
snd_ctl_close(handle);
continue;
}
@@ -171,7 +171,7 @@ bool MidiManagerAlsa::Initialize() {
scoped_refptr<MidiDeviceInfo> port = new MidiDeviceInfo(
this, id, card, output ? midi_out : midi_in, device);
if (!port->IsOpened()) {
- DLOG(ERROR) << "MidiDeviceInfo open fails";
+ LOG(ERROR) << "MidiDeviceInfo open fails";
continue;
}
if (input) {
@@ -187,7 +187,7 @@ bool MidiManagerAlsa::Initialize() {
}
if (pipe(pipe_fd_) < 0) {
- DPLOG(ERROR) << "pipe() failed";
+ PLOG(ERROR) << "pipe() failed";
return false;
}
event_thread_.Start();
@@ -266,7 +266,7 @@ void MidiManagerAlsa::EventReset() {
void MidiManagerAlsa::EventLoop() {
if (HANDLE_EINTR(poll(&poll_fds_[0], poll_fds_.size(), -1)) < 0) {
- DPLOG(ERROR) << "Couldn't poll(). Stop to poll input MIDI devices.";
+ PLOG(ERROR) << "Couldn't poll(). Stop to poll input MIDI devices.";
// TODO(toyoshim): Handle device disconnection, and try to reconnect?
return;
}