|
@@ -67,7 +67,7 @@ static void DoSetVolume()
|
|
|
}
|
|
|
}
|
|
|
if (output_unit == nullptr) {
|
|
|
DEBUG(driver, 1, "cocoa_m: Failed to get output node to set volume");
|
|
|
Debug(driver, 1, "cocoa_m: Failed to get output node to set volume");
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -119,7 +119,7 @@ void MusicDriver_Cocoa::PlaySong(const M
|
|
|
{
|
|
|
std::string filename = MidiFile::GetSMFFile(song);
|
|
|
|
|
|
DEBUG(driver, 2, "cocoa_m: trying to play '%s'", filename.c_str());
|
|
|
Debug(driver, 2, "cocoa_m: trying to play '{}'", filename);
|
|
|
|
|
|
this->StopSong();
|
|
|
if (_sequence != nullptr) {
|
|
@@ -130,7 +130,7 @@ void MusicDriver_Cocoa::PlaySong(const M
|
|
|
if (filename.empty()) return;
|
|
|
|
|
|
if (NewMusicSequence(&_sequence) != noErr) {
|
|
|
DEBUG(driver, 0, "cocoa_m: Failed to create music sequence");
|
|
|
Debug(driver, 0, "cocoa_m: Failed to create music sequence");
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -138,7 +138,7 @@ void MusicDriver_Cocoa::PlaySong(const M
|
|
|
CFAutoRelease<CFURLRef> url(CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8*)os_file.c_str(), os_file.length(), false));
|
|
|
|
|
|
if (MusicSequenceFileLoad(_sequence, url.get(), kMusicSequenceFile_AnyType, 0) != noErr) {
|
|
|
DEBUG(driver, 0, "cocoa_m: Failed to load MIDI file");
|
|
|
Debug(driver, 0, "cocoa_m: Failed to load MIDI file");
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -148,7 +148,7 @@ void MusicDriver_Cocoa::PlaySong(const M
|
|
|
MusicSequenceGetAUGraph(_sequence, &graph);
|
|
|
AUGraphOpen(graph);
|
|
|
if (AUGraphInitialize(graph) != noErr) {
|
|
|
DEBUG(driver, 0, "cocoa_m: Failed to initialize AU graph");
|
|
|
Debug(driver, 0, "cocoa_m: Failed to initialize AU graph");
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -173,7 +173,7 @@ void MusicDriver_Cocoa::PlaySong(const M
|
|
|
if (MusicPlayerStart(_player) != noErr) return;
|
|
|
_playing = true;
|
|
|
|
|
|
DEBUG(driver, 3, "cocoa_m: playing '%s'", filename.c_str());
|
|
|
Debug(driver, 3, "cocoa_m: playing '{}'", filename);
|
|
|
}
|
|
|
|
|
|
|