View | Details | Raw Unified | Return to bug 7857
Collapse All | Expand All

(-)xmms-1.2.10.orig/Output/alsa/audio.c (-10 / +28 lines)
Lines 183-199 Link Here
183
183
184
void alsa_pause(short p)
184
void alsa_pause(short p)
185
{
185
{
186
	int err;
187
	
186
	debug("alsa_pause");
188
	debug("alsa_pause");
187
	if (p)
189
	if (alsa_can_pause) {
188
		paused = TRUE;
190
		if (p) {
189
191
			paused = TRUE;
190
	if (alsa_can_pause)
192
			debug("alsa can pause, paused");
191
		snd_pcm_pause(alsa_pcm, p);
193
		} else {
192
	else if (p)
194
			paused = FALSE;
193
		snd_pcm_drop(alsa_pcm);
195
			debug("alsa can pause, continued");
194
196
		}
195
	if (!p)
197
		if ((err = snd_pcm_pause(alsa_pcm, p)) < 0)
196
		paused = FALSE;
198
			debug("snd_pcm_pause error: %s\n",
199
				snd_strerror(err));
200
	} else {
201
		if (p) {
202
			paused = TRUE;
203
			debug("alsa can't pause, dropped");
204
			if ((err = snd_pcm_drop(alsa_pcm)) < 0)
205
				debug("snd_pcm_drop error: %s\n",
206
					snd_strerror(err));
207
		} else {
208
			paused = FALSE;
209
			debug("alsa can't pause, prepared");
210
			if ((err = snd_pcm_prepare(alsa_pcm)) < 0)
211
				debug("snd_pcm_prepare error: %s\n",
212
					snd_strerror(err));
213
		}
214
	}
197
}
215
}
198
216
199
void alsa_close(void)
217
void alsa_close(void)

Return to bug 7857