]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Added snd_pcm_playback_pause function.
authorJaroslav Kysela <perex@perex.cz>
Tue, 25 Aug 1998 15:38:50 +0000 (15:38 +0000)
committerJaroslav Kysela <perex@perex.cz>
Tue, 25 Aug 1998 15:38:50 +0000 (15:38 +0000)
include/pcm.h
src/pcm/pcm.c

index c1065f99224cb0c0346b86b1caa91f2b06b345f1..6eb55f7c58e0c9f165199f460786ded02405a599 100644 (file)
@@ -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 );
index 470b9f79b2904b8dbef7d5767c27191511340c43..ffbc3658ca26e449834d84819295f823e932ff0f 100644 (file)
@@ -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;