]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - alsa_write.c
Merge topic branch t/sf_float into pu
[paraslash.git] / alsa_write.c
index 2bf3fd0e9010539fa6784e554ae7dc8c21441d3d..7e71d4aef70396c4ee7599d9ca890f7ec9cc04d5 100644 (file)
@@ -61,6 +61,8 @@ static snd_pcm_format_t get_alsa_pcm_format(enum sample_format sf)
        case SF_S16_BE: return SND_PCM_FORMAT_S16_BE;
        case SF_U16_LE: return SND_PCM_FORMAT_U16_LE;
        case SF_U16_BE: return SND_PCM_FORMAT_U16_BE;
+       case SF_FLOAT_LE: return SND_PCM_FORMAT_FLOAT_LE;
+       case SF_FLOAT_BE: return SND_PCM_FORMAT_FLOAT_BE;
        default: return SND_PCM_FORMAT_S16_LE;
        }
 }
@@ -277,7 +279,7 @@ again:
        bytes = btr_next_buffer(btrn, &data);
        if (ret < 0 || bytes < wn->min_iqs) { /* eof */
                assert(btr_no_parent(btrn));
-               ret = -E_WRITE_COMMON_EOF;
+               ret = -E_EOF;
                if (!pad)
                        goto err;
                /* wait until pending frames are played */
@@ -296,7 +298,7 @@ again:
 
                if (bytes == 0) /* no data available */
                        return 0;
-               pad = wn->private_data = para_calloc(sizeof(*pad));
+               pad = wn->private_data = zalloc(sizeof(*pad));
                ret = get_btr_sample_rate(btrn, &val);
                if (ret < 0)
                        goto err;