- p_input->pf_read = CDDARead;
- p_input->pf_seek = CDDASeek;
- p_input->pf_set_area = CDDASetArea;
- p_input->pf_set_program = CDDASetProgram;
-
- /* Update default_pts to a suitable value for cdda access */
- var_Create( p_input, MODULE_STRING "-caching",
- VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
- var_Get( p_input, MODULE_STRING "-caching", &val );
- p_input->i_pts_delay = val.i_int * 1000;
-
- free( psz_source );
-
- /* Build a WAV header for the output data */
- 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, 44100);
- SetWLE( &p_cdda->waveheader.BytesPerSample,
- 2 /*Modus*/ * 16 /*BitsPerSample*/ / 8 );
- SetDWLE( &p_cdda->waveheader.BytesPerSec,
- 16 /*BytesPerSample*/ * 44100 /*SampleFreq*/ );
- p_cdda->waveheader.DataChunkID = VLC_FOURCC('d', 'a', 't', 'a');
- p_cdda->waveheader.DataLength = 0; /* we just don't know */
- p_cdda->i_header_pos = 0;