stuff for configuring the audio output format (sampling rate, channels, bits)
git-svn-id: https://svn.musicpd.org/mpd/trunk@967 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
@@ -124,7 +124,7 @@ int waitOnDecode(PlayerControl * pc, AudioFormat * af, DecoderControl * dc,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(initAudio(af)<0) {
|
||||
if(openAudioDevice(af)<0) {
|
||||
strncpy(pc->erroredFile,pc->file,MAXPATHLEN);
|
||||
pc->erroredFile[MAXPATHLEN] = '\0';
|
||||
pc->error = PLAYER_ERROR_AUDIO;
|
||||
@@ -190,7 +190,7 @@ void decodeSeek(PlayerControl * pc, AudioFormat * af, DecoderControl * dc,
|
||||
pause = !pause; \
|
||||
if(pause) pc->state = PLAYER_STATE_PAUSE; \
|
||||
else { \
|
||||
if(initAudio(NULL)<0) { \
|
||||
if(openAudioDevice(NULL)<0) { \
|
||||
strncpy(pc->erroredFile,pc->file,MAXPATHLEN); \
|
||||
pc->erroredFile[MAXPATHLEN] = '\0'; \
|
||||
pc->error = PLAYER_ERROR_AUDIO; \
|
||||
@@ -201,7 +201,7 @@ void decodeSeek(PlayerControl * pc, AudioFormat * af, DecoderControl * dc,
|
||||
} \
|
||||
pc->pause = 0; \
|
||||
kill(getppid(),SIGUSR1); \
|
||||
if(pause) finishAudio(); \
|
||||
if(pause) closeAudioDevice(); \
|
||||
} \
|
||||
if(pc->seek) { \
|
||||
pc->totalPlayTime+= pc->elapsedTime-pc->beginTime; \
|
||||
|
||||
Reference in New Issue
Block a user