aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutputs
diff options
context:
space:
mode:
Diffstat (limited to 'src/audioOutputs')
-rw-r--r--src/audioOutputs/audioOutput_alsa.c5
-rw-r--r--src/audioOutputs/audioOutput_mvp.c2
-rw-r--r--src/audioOutputs/audioOutput_oss.c3
-rw-r--r--src/audioOutputs/audioOutput_osx.c3
4 files changed, 8 insertions, 5 deletions
diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c
index 61c7670a2..e3378143e 100644
--- a/src/audioOutputs/audioOutput_alsa.c
+++ b/src/audioOutputs/audioOutput_alsa.c
@@ -70,10 +70,11 @@ static void freeAlsaData(AlsaData * ad) {
static int alsa_initDriver(AudioOutput * audioOutput, ConfigParam * param) {
BlockParam * bp = NULL;
-
+ AlsaData * ad;
+
if(param) bp = getBlockParam(param, "device");
- AlsaData * ad = newAlsaData();
+ ad = newAlsaData();
audioOutput->data = ad;
diff --git a/src/audioOutputs/audioOutput_mvp.c b/src/audioOutputs/audioOutput_mvp.c
index 54f3b4327..4f60fb595 100644
--- a/src/audioOutputs/audioOutput_mvp.c
+++ b/src/audioOutputs/audioOutput_mvp.c
@@ -187,6 +187,7 @@ static int mvp_setPcmParams(MvpData *md, unsigned long rate, int channels, int b
static int mvp_openDevice(AudioOutput * audioOutput)
{
int ret = -1;
+ long long int stc = 0;
MvpData * md = audioOutput->data;
AudioFormat * audioFormat = &audioOutput->outAudioFormat;
int mix[5] = { 0, 2, 7, 1, 0 };
@@ -208,7 +209,6 @@ static int mvp_openDevice(AudioOutput * audioOutput)
ERROR("Error setting audio format: %s\n", strerror(errno));
return -1;
}
- long long int stc = 0;
ioctl(md->fd, MVP_SET_AUD_STC, &stc);
if (ioctl(md->fd, MVP_SET_AUD_BYPASS, 1) < 0){
ERROR("Error setting audio streamtype: %s\n", strerror(errno));
diff --git a/src/audioOutputs/audioOutput_oss.c b/src/audioOutputs/audioOutput_oss.c
index ad5b93f6b..6cfb4f18f 100644
--- a/src/audioOutputs/audioOutput_oss.c
+++ b/src/audioOutputs/audioOutput_oss.c
@@ -319,10 +319,11 @@ static int oss_testDefault() {
static int oss_initDriver(AudioOutput * audioOutput, ConfigParam * param) {
BlockParam * bp = NULL;
+ OssData * od;
if(param) bp = getBlockParam(param, "device");
- OssData * od = newOssData();
+ od = newOssData();
audioOutput->data = od;
if(!bp) {
diff --git a/src/audioOutputs/audioOutput_osx.c b/src/audioOutputs/audioOutput_osx.c
index 00beaef33..191edebd5 100644
--- a/src/audioOutputs/audioOutput_osx.c
+++ b/src/audioOutputs/audioOutput_osx.c
@@ -291,8 +291,9 @@ static int osx_play(AudioOutput * audioOutput, char * playChunk, int size) {
//DEBUG("osx_play: enter\n");
if(!od->started) {
+ int err;
od->started = 1;
- int err = AudioOutputUnitStart(od->au);
+ err = AudioOutputUnitStart(od->au);
if(err) {
ERROR("unable to start audio output: %i\n", err);
return -1;