summaryrefslogtreecommitdiff
path: root/drivers/coreaudio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/coreaudio')
-rw-r--r--drivers/coreaudio/audio_driver_coreaudio.cpp15
-rw-r--r--drivers/coreaudio/audio_driver_coreaudio.h1
2 files changed, 0 insertions, 16 deletions
diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp
index 76d2d13dfe..d71d8cdaba 100644
--- a/drivers/coreaudio/audio_driver_coreaudio.cpp
+++ b/drivers/coreaudio/audio_driver_coreaudio.cpp
@@ -168,7 +168,6 @@ OSStatus AudioDriverCoreAudio::output_callback(void *inRefCon,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber, UInt32 inNumberFrames,
AudioBufferList *ioData) {
-
AudioDriverCoreAudio *ad = (AudioDriverCoreAudio *)inRefCon;
if (!ad->active || !ad->try_lock()) {
@@ -182,18 +181,15 @@ OSStatus AudioDriverCoreAudio::output_callback(void *inRefCon,
ad->start_counting_ticks();
for (unsigned int i = 0; i < ioData->mNumberBuffers; i++) {
-
AudioBuffer *abuf = &ioData->mBuffers[i];
unsigned int frames_left = inNumberFrames;
int16_t *out = (int16_t *)abuf->mData;
while (frames_left) {
-
unsigned int frames = MIN(frames_left, ad->buffer_frames);
ad->audio_server_process(frames, ad->samples_in.ptrw());
for (unsigned int j = 0; j < frames * ad->channels; j++) {
-
out[j] = ad->samples_in[j] >> 16;
}
@@ -213,7 +209,6 @@ OSStatus AudioDriverCoreAudio::input_callback(void *inRefCon,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber, UInt32 inNumberFrames,
AudioBufferList *ioData) {
-
AudioDriverCoreAudio *ad = (AudioDriverCoreAudio *)inRefCon;
if (!ad->active) {
return 0;
@@ -475,7 +470,6 @@ void AudioDriverCoreAudio::capture_finish() {
}
Error AudioDriverCoreAudio::capture_start() {
-
input_buffer_init(buffer_frames);
OSStatus result = AudioOutputUnitStart(input_unit);
@@ -487,7 +481,6 @@ Error AudioDriverCoreAudio::capture_start() {
}
Error AudioDriverCoreAudio::capture_stop() {
-
if (input_unit) {
OSStatus result = AudioOutputUnitStop(input_unit);
if (result != noErr) {
@@ -501,7 +494,6 @@ Error AudioDriverCoreAudio::capture_stop() {
#ifdef OSX_ENABLED
Array AudioDriverCoreAudio::_get_device_list(bool capture) {
-
Array list;
list.push_back("Default");
@@ -558,7 +550,6 @@ Array AudioDriverCoreAudio::_get_device_list(bool capture) {
}
void AudioDriverCoreAudio::_set_device(const String &device, bool capture) {
-
AudioDeviceID deviceId;
bool found = false;
if (device != "Default") {
@@ -639,17 +630,14 @@ void AudioDriverCoreAudio::_set_device(const String &device, bool capture) {
}
Array AudioDriverCoreAudio::get_device_list() {
-
return _get_device_list();
}
String AudioDriverCoreAudio::get_device() {
-
return device_name;
}
void AudioDriverCoreAudio::set_device(String device) {
-
device_name = device;
if (active) {
_set_device(device_name);
@@ -657,7 +645,6 @@ void AudioDriverCoreAudio::set_device(String device) {
}
void AudioDriverCoreAudio::capture_set_device(const String &p_name) {
-
capture_device_name = p_name;
if (active) {
_set_device(capture_device_name, true);
@@ -665,12 +652,10 @@ void AudioDriverCoreAudio::capture_set_device(const String &p_name) {
}
Array AudioDriverCoreAudio::capture_get_device_list() {
-
return _get_device_list(true);
}
String AudioDriverCoreAudio::capture_get_device() {
-
return capture_device_name;
}
diff --git a/drivers/coreaudio/audio_driver_coreaudio.h b/drivers/coreaudio/audio_driver_coreaudio.h
index 89dd52181f..6b7a35588f 100644
--- a/drivers/coreaudio/audio_driver_coreaudio.h
+++ b/drivers/coreaudio/audio_driver_coreaudio.h
@@ -41,7 +41,6 @@
#endif
class AudioDriverCoreAudio : public AudioDriver {
-
AudioComponentInstance audio_unit = nullptr;
AudioComponentInstance input_unit = nullptr;