prevent popup deactivation while button_down
[goodguy/history.git] / cinelerra-5.0 / cinelerra / audioalsa.C
index 3ec41711984b42d174b436e695b4c8c553f3f5ac..962755e8c0eb5dbfed2fcd03ce5eb5fe373dd581 100644 (file)
@@ -512,6 +512,15 @@ int AudioALSA::write_buffer(char *buffer, int size)
        int count = samples;
        snd_pcm_sframes_t delay = 0;
 
+// static FILE *debug_fd = 0;
+// if(!debug_fd)
+// {
+//     debug_fd = fopen("/tmp/debug.pcm", "w");
+// }
+// fwrite(buffer, size, 1, debug_fd);
+// fflush(debug_fd);
+
+
        if(!get_output()) return 0;
        if( buffer_position == 0 )
                timer->update();
@@ -524,6 +533,9 @@ int AudioALSA::write_buffer(char *buffer, int size)
                int ret = snd_pcm_avail_update(get_output());
                if( ret >= period_size ) {
                        if( ret > count ) ret = count;
+//FILE *alsa_fp = 0;
+//if( !alsa_fp ) alsa_fp = fopen("/tmp/alsa.raw","w");
+//if( alsa_fp ) fwrite(buffer, sample_size, ret, alsa_fp);
 //printf("AudioALSA::snd_pcm_writei start %d\n",count);
                        ret = snd_pcm_writei(get_output(),buffer,ret);
 //printf("AudioALSA::snd_pcm_writei done %d\n", ret);