Esempio n. 1
0
bool obs_reset_audio(struct audio_output_info *ai)
{
	if (!obs) return false;

	/* don't allow changing of audio settings if active. */
	if (obs->audio.audio && audio_output_active(obs->audio.audio))
		return false;

	obs_free_audio();
	if(!ai)
		return true;

	return obs_init_audio(ai);
}
Esempio n. 2
0
bool obs_reset_audio(struct audio_output_info *ai)
{
	if (!obs) return false;

	/* don't allow changing of audio settings if active. */
	if (obs->audio.audio && audio_output_active(obs->audio.audio))
		return false;

	obs_free_audio();
	if(!ai)
		return true;

	blog(LOG_INFO, "audio settings reset:\n"
	               "\tsamples per sec: %d\n"
	               "\tspeakers:        %d\n"
	               "\tbuffering (ms):  %d\n",
	               (int)ai->samples_per_sec,
	               (int)ai->speakers,
	               (int)ai->buffer_ms);

	return obs_init_audio(ai);
}