diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-02-13 11:54:53 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-02-13 11:54:53 -0500 |
commit | a7b63511accf436029cdcbd5953f2d73d5daa81f (patch) | |
tree | fbf431dcfa84908c092636229414204db704520e | |
parent | 9888a4d2d12dc874a75c114ba52c9956065ba923 (diff) |
audio: wip: osx patches verified on an OSX machine.
-rw-r--r-- | gr-audio/lib/osx/osx_sink.cc | 6 | ||||
-rw-r--r-- | gr-audio/lib/osx/osx_source.cc | 42 |
2 files changed, 24 insertions, 24 deletions
diff --git a/gr-audio/lib/osx/osx_sink.cc b/gr-audio/lib/osx/osx_sink.cc index 3083bc9e96..ace96ec742 100644 --- a/gr-audio/lib/osx/osx_sink.cc +++ b/gr-audio/lib/osx/osx_sink.cc @@ -70,7 +70,7 @@ namespace gr { else if(channel_config == -1) { // no user input; try "device name" instead int l_n_channels = (int)strtol(device_name.data(), (char**)NULL, 10); - if(l_n_channels == 0 & errno) { + if((l_n_channels == 0) & errno) { std::cerr << "Error Converting Device Name: " << errno << std::endl; throw std::invalid_argument("audio_osx_sink::audio_osx_sink"); } @@ -149,7 +149,7 @@ namespace gr { // Set up a callback function to generate output to the output unit AURenderCallbackStruct input; - input.inputProc = (AURenderCallback)(audio_osx_sink::AUOutputCallback); + input.inputProc = (AURenderCallback)(osx_sink::AUOutputCallback); input.inputProcRefCon = this; err = AudioUnitSetProperty(d_OutputAU, @@ -383,7 +383,7 @@ namespace gr { UInt32 inNumberFrames, AudioBufferList *ioData) { - audio_osx_sink* This = (audio_osx_sink*)inRefCon; + osx_sink* This = (osx_sink*)inRefCon; OSStatus err = noErr; gruel::scoped_lock l(*This->d_internal); diff --git a/gr-audio/lib/osx/osx_source.cc b/gr-audio/lib/osx/osx_source.cc index ee057c8337..c79a6ec6e9 100644 --- a/gr-audio/lib/osx/osx_source.cc +++ b/gr-audio/lib/osx/osx_source.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006-2011 Free Software Foundation, Inc. + * Copyright 2006-2011,2013 Free Software Foundation, Inc. * * This file is part of GNU Radio. * @@ -40,8 +40,8 @@ namespace gr { const std::string &device_name, bool ok_to_block) { - return audio_source::sptr - (new audio_osx_source(sampling_rate, device_name, ok_to_block)); + return source::sptr + (new osx_source(sampling_rate, device_name, ok_to_block)); } void @@ -75,21 +75,21 @@ namespace gr { gr_make_io_signature(0, 0, 0), gr_make_io_signature(0, 0, 0)), d_deviceSampleRate(0.0), d_outputSampleRate(0.0), - d_channel_config(0), - d_inputBufferSizeFrames(0), d_inputBufferSizeBytes(0), - d_outputBufferSizeFrames(0), d_outputBufferSizeBytes(0), - d_deviceBufferSizeFrames(0), d_deviceBufferSizeBytes(0), - d_leadSizeFrames(0), d_leadSizeBytes(0), - d_trailSizeFrames(0), d_trailSizeBytes(0), - d_extraBufferSizeFrames(0), d_extraBufferSizeBytes(0), - d_queueSampleCount(0), d_max_sample_count(0), - d_n_AvailableInputFrames(0), d_n_ActualInputFrames(0), - d_n_user_channels(0), d_n_max_channels(0), d_n_deviceChannels(0), - d_do_block(do_block), d_passThrough(false), - d_internal(0), d_cond_data(0), - d_buffers(0), - d_InputAU(0), d_InputBuffer(0), d_OutputBuffer(0), - d_AudioConverter(0) + d_channel_config(0), + d_inputBufferSizeFrames(0), d_inputBufferSizeBytes(0), + d_outputBufferSizeFrames(0), d_outputBufferSizeBytes(0), + d_deviceBufferSizeFrames(0), d_deviceBufferSizeBytes(0), + d_leadSizeFrames(0), d_leadSizeBytes(0), + d_trailSizeFrames(0), d_trailSizeBytes(0), + d_extraBufferSizeFrames(0), d_extraBufferSizeBytes(0), + d_queueSampleCount(0), d_max_sample_count(0), + d_n_AvailableInputFrames(0), d_n_ActualInputFrames(0), + d_n_user_channels(0), d_n_max_channels(0), d_n_deviceChannels(0), + d_do_block(do_block), d_passThrough(false), + d_internal(0), d_cond_data(0), + d_buffers(0), + d_InputAU(0), d_InputBuffer(0), d_OutputBuffer(0), + d_AudioConverter(0) { if(sample_rate <= 0) { std::cerr << "Invalid Sample Rate: " << sample_rate << std::endl; @@ -105,7 +105,7 @@ namespace gr { else if (channel_config == -1) { // no user input; try "device name" instead int l_n_channels = (int)strtol(device_name.data(), (char **)NULL, 10); - if(l_n_channels == 0 & errno) { + if((l_n_channels == 0) & errno) { std::cerr << "Error Converting Device Name: " << errno << std::endl; throw std::invalid_argument("audio_osx_source::audio_osx_source"); } @@ -250,7 +250,7 @@ namespace gr { AURenderCallbackStruct AUCallBack; - AUCallBack.inputProc = (AURenderCallback)(audio_osx_source::AUInputCallback); + AUCallBack.inputProc = (AURenderCallback)(osx_source::AUInputCallback); AUCallBack.inputProcRefCon = this; err = AudioUnitSetProperty(d_InputAU, @@ -804,7 +804,7 @@ namespace gr { AudioBufferList* ioData) { OSStatus err = noErr; - audio_osx_source* This = static_cast<audio_osx_source*>(inRefCon); + osx_source* This = static_cast<osx_source*>(inRefCon); gruel::scoped_lock l(*This->d_internal); |