aboutsummaryrefslogblamecommitdiffstats
path: root/src/outputBuffer_audio.h
blob: 332c61d875dac36299a643b358cada69489c7ded (plain) (tree)
1
2
3
4
5
6
7
8
9







                                                                
                                           
                         

                                                   
                         





                                                  
/*
 * reopen is set when we get a new song and there's a difference
 * in audio format
 */
static int open_audio_devices(int reopen)
{
	assert(pthread_equal(pthread_self(), ob.thread));

	if (!reopen && isAudioDeviceOpen())
		return 0;

	if (openAudioDevice(&ob.audio_format) >= 0)
		return 0;
	stop_playback();
	player_seterror(PLAYER_ERROR_AUDIO, NULL);
	ERROR("problems opening audio device\n");
	return -1;
}