From 338cf74af29ee34ae1d5b6c7363eb4bc4d838564 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 25 Aug 1998 15:38:50 +0000 Subject: [PATCH] Added snd_pcm_playback_pause function. --- include/pcm.h | 1 + src/pcm/pcm.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/include/pcm.h b/include/pcm.h index c1065f99..6eb55f7c 100644 --- a/include/pcm.h +++ b/include/pcm.h @@ -29,6 +29,7 @@ int snd_pcm_record_status( void *handle, snd_pcm_record_status_t *status ); int snd_pcm_drain_playback( void *handle ); int snd_pcm_flush_playback( void *handle ); int snd_pcm_flush_record( void *handle ); +int snd_pcm_playback_pause( void *handle, int enable ); int snd_pcm_playback_time( void *handle, int enable ); int snd_pcm_record_time( void *handle, int enable ); ssize_t snd_pcm_write( void *handle, const void *buffer, size_t size ); diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c index 470b9f79..ffbc3658 100644 --- a/src/pcm/pcm.c +++ b/src/pcm/pcm.c @@ -219,6 +219,17 @@ int snd_pcm_flush_record( void *handle ) return 0; } +int snd_pcm_playback_pause( void *handle, int enable ) +{ + snd_pcm_t *pcm; + + pcm = (snd_pcm_t *)handle; + if ( !pcm ) return -EINVAL; + if ( ioctl( pcm -> fd, SND_PCM_IOCTL_PLAYBACK_PAUSE, &enable ) < 0 ) + return -errno; + return 0; +} + int snd_pcm_playback_time( void *handle, int enable ) { snd_pcm_t *pcm; -- 2.47.1