File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed
Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change 1313#include "utils.h"
1414#include "virtio.h"
1515
16- #define WRITEOUT 0
17-
1816#define VSND_DEV_CNT_MAX 1
1917
2018#define VSND_QUEUE_NUM_MAX 1024
2321#define PRIV (x ) ((virtio_snd_config_t *) x->priv)
2422
2523#define VSND_CNFA_FRAME_SZ 2
26- #if WRITEOUT
27- FILE * outfile ;
28- #endif
24+
2925enum {
3026 VSND_QUEUE_CTRL = 0 ,
3127 VSND_QUEUE_EVT = 1 ,
@@ -544,9 +540,6 @@ static void virtio_snd_read_pcm_prepare(const virtio_snd_pcm_hdr_t *query,
544540 INIT_LIST_HEAD (& props -> buf_queue_head );
545541 props -> intermediate =
546542 (void * ) malloc (sizeof (* props -> intermediate ) * cnfa_period_bytes );
547- #if WRITEOUT
548- outfile = fopen ("out_deque.bin" , "wb" );
549- #endif
550543
551544 * plen = 0 ;
552545 fprintf (stderr , "virtio_snd_read_pcm_prepare\n" );
@@ -620,9 +613,7 @@ static void virtio_snd_read_pcm_release(const virtio_snd_pcm_hdr_t *query,
620613 }
621614
622615 props -> pp .hdr .hdr .code = VIRTIO_SND_R_PCM_RELEASE ;
623- #if WRITEOUT
624- fclose (outfile );
625- #endif
616+
626617 /* Tear down the PCM ring buffer. */
627618 free (props -> intermediate );
628619 pthread_mutex_destroy (& props -> lock .lock );
@@ -683,10 +674,6 @@ static void __virtio_snd_frame_dequeue(short *out,
683674 memcpy (props -> intermediate + written_bytes , node -> addr + node -> pos ,
684675 len );
685676
686- #if WRITEOUT
687- fwrite (node -> addr + node -> pos , sizeof (void ), len , outfile );
688- #endif
689-
690677 written_bytes += len ;
691678 node -> pos += len ;
692679 if (node -> pos >= node -> len ) {
You can’t perform that action at this time.
0 commit comments