+ /* Build a WAV header to put in front of the output data.
+ This gets sent back in the Block (read) routine.
+ */
+ memset( &p_cdda->waveheader, 0, sizeof(WAVEHEADER) );
+
+ SetWLE( &p_cdda->waveheader.Format, 1 ); /*WAVE_FORMAT_PCM*/
+ SetWLE( &p_cdda->waveheader.BitsPerSample, 16);
+
+ p_cdda->waveheader.MainChunkID = VLC_FOURCC('R', 'I', 'F', 'F');
+ p_cdda->waveheader.Length = 0; /* we just don't know */
+ p_cdda->waveheader.ChunkTypeID = VLC_FOURCC('W', 'A', 'V', 'E');
+ p_cdda->waveheader.SubChunkID = VLC_FOURCC('f', 'm', 't', ' ');
+
+ SetDWLE( &p_cdda->waveheader.SubChunkLength, 16);
+ SetWLE( &p_cdda->waveheader.Modus, 2);
+ SetDWLE( &p_cdda->waveheader.SampleFreq, CDDA_FREQUENCY_SAMPLE);
+ SetWLE( &p_cdda->waveheader.BytesPerSample,
+ 2 /*Modus*/ * 16 /*BitsPerSample*/ / 8 );
+ SetDWLE( &p_cdda->waveheader.BytesPerSec,
+ 2*16/8 /*BytesPerSample*/ * CDDA_FREQUENCY_SAMPLE );
+
+ p_cdda->waveheader.DataChunkID = VLC_FOURCC('d', 'a', 't', 'a');
+ p_cdda->waveheader.DataLength = 0; /* we just don't know */
+
+ /* PTS delay */
+ var_Create( p_access, MODULE_STRING "-caching",
+ VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
+ vlc_object_release( p_cdda->p_input );
+ return VLC_SUCCESS;
+
+ error:
+ cdio_destroy( p_cdda->p_cdio );
+ free( psz_source );
+ if( p_cdda )