- p_input->stream.b_pace_control = 1;
- p_input->stream.b_seekable = 1;
- p_input->stream.i_mux_rate = 44100 * 4 / 50;
-
-#define area p_input->stream.pp_areas
- for( i = 1 ; i <= p_sys->i_nb_tracks ; i++ )
- {
- input_AddArea( p_input, i, 1 );
-
- /* Absolute start offset and size */
- area[i]->i_start =
- (off_t)p_sys->p_sectors[i-1] * (off_t)CDDA_DATA_SIZE;
- area[i]->i_size =
- (off_t)(p_sys->p_sectors[i] - p_sys->p_sectors[i-1])
- * (off_t)CDDA_DATA_SIZE;
- }
-#undef area
-
- p_area = p_input->stream.pp_areas[i_title];
-
- SetArea( p_input, p_area );
-
- vlc_mutex_unlock( &p_input->stream.stream_lock );
-
- p_input->pf_read = Read;
- p_input->pf_seek = Seek;
- p_input->pf_set_area = SetArea;
- p_input->pf_set_program = SetProgram;
-
- /* Update default_pts to a suitable value for cdda access */
- p_input->i_pts_delay = config_GetInt( p_input, "cdda-caching" ) * 1000;
-
- /* Build a WAV header for the output data */
- memset( &p_sys->waveheader, 0, sizeof(WAVEHEADER) );
- SetWLE( &p_sys->waveheader.Format, 1 ); /*WAVE_FORMAT_PCM*/
- SetWLE( &p_sys->waveheader.BitsPerSample, 16);
- p_sys->waveheader.MainChunkID = VLC_FOURCC('R', 'I', 'F', 'F');
- p_sys->waveheader.Length = 0; /* we just don't know */
- p_sys->waveheader.ChunkTypeID = VLC_FOURCC('W', 'A', 'V', 'E');
- p_sys->waveheader.SubChunkID = VLC_FOURCC('f', 'm', 't', ' ');
- SetDWLE( &p_sys->waveheader.SubChunkLength, 16);
- SetWLE( &p_sys->waveheader.Modus, 2);
- SetDWLE( &p_sys->waveheader.SampleFreq, 44100);
- SetWLE( &p_sys->waveheader.BytesPerSample,
- 2 /*Modus*/ * 16 /*BitsPerSample*/ / 8 );
- SetDWLE( &p_sys->waveheader.BytesPerSec,
- 2*16/8 /*BytesPerSample*/ * 44100 /*SampleFreq*/ );
- p_sys->waveheader.DataChunkID = VLC_FOURCC('d', 'a', 't', 'a');
- p_sys->waveheader.DataLength = 0; /* we just don't know */
- p_sys->i_header_pos = 0;