Skip to content

Alsa device, won't play #5

@ghost

Description

Hi,
When alsa is set, I'm unable to play any samples (playhead refuses to move).
I think there something with the device. I tried plughw:0,0, pcm names with no errors but playhead won't move.
my config:
./configure --prefix=/usr --disable-oss --disable-pulseaudio --disable-speex

I tested with the original source and alsa works with default device.
voidlinux x64 glib-2.56.0.

Edit: this commit to driver_alsa.c brakes something..

@@ -169,17 +169,12 @@
   int err;
   snd_pcm_t * pcm_handle = (snd_pcm_t *)handle->custom_data;
   snd_pcm_hw_params_t * hwparams;
-  int dir;
   unsigned int rate = format->rate;
   unsigned int channels = format->channels;
   unsigned int periods;
   snd_pcm_uframes_t period_size = PBUF_SIZE/format->channels;
 
-  if (handle->driver_flags == O_RDONLY) {
-    dir = (int)SND_PCM_STREAM_CAPTURE;
-  } else if (handle->driver_flags == O_WRONLY) {
-    dir = (int)SND_PCM_STREAM_PLAYBACK;
-  } else {
+  if (handle->driver_flags != O_RDONLY && handle->driver_flags == O_WRONLY) {
     return;
   }
 

reverting this fixes it for me

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions