[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libcdio-help] 44 bit difference
From: |
Cuke |
Subject: |
Re: [Libcdio-help] 44 bit difference |
Date: |
Thu, 16 Apr 2009 10:05:15 -0700 (PDT) |
if you need more info i'm here!
Cuke wrote:
>
> my extracted audio track differ from the cd-paranoia's one of 44bit.My
> track isn't played either..this is the i use for extraction. the qdebug()
> function is just for display debug info in qt project. where i'm
> mistaking?
>
> cdrom_drive_t *d = NULL;
> char **ppsz_cd_drives;
>
> ppsz_cd_drives = cdio_get_devices_with_cap(NULL, CDIO_FS_AUDIO,
> false);
>
> if (ppsz_cd_drives) {
> d=cdda_identify(*ppsz_cd_drives, 1, NULL);
> }else{
> qDebug() << "Unable to access to a cdrom with audio cd in it";
> return;
> }
>
> cdio_free_device_list(ppsz_cd_drives);
>
> if ( !d ) {
> qDebug() << "Unable to identify audio CD disc.\n";
> return;
> }
>
> cdda_verbose_set(d, CDDA_MESSAGE_PRINTIT, CDDA_MESSAGE_PRINTIT);
>
> if ( 0 != cdda_open(d) ) {
> qDebug() << "Unable to open disc.\n";
> return;
> }
>
> cdrom_paranoia_t* p = cdio_paranoia_init(d);
> lsn_t i_first_lsn = cdda_disc_firstsector(d);
>
> if ( -1 == i_first_lsn ) {
> qDebug() << "Trouble getting starting LSN\n";
> }
> else {
> lsn_t i_cursor;
> track_t i_track = cdda_sector_gettrack(d, i_first_lsn);
> lsn_t i_last_lsn = cdda_track_lastsector(d, i_track);
>
> //paranoia_modeset(p, PARANOIA_MODE_FULL^PARANOIA_MODE_NEVERSKIP);
> paranoia_seek(p, i_first_lsn, SEEK_SET);
>
> qDebug() << i_first_lsn << "-" << i_last_lsn;
>
> QFile file(tr("outtrack.wav"));
> if(!file.open(QIODevice::WriteOnly|QIODevice::Append)){
> qDebug() << "impossibile aprire il file di scrittura";
> }
> for ( i_cursor = i_first_lsn; i_cursor <= i_last_lsn; i_cursor ++)
> {
>
> int16_t *p_readbuf=paranoia_read(p, NULL);
> char *psz_err=cdda_errors(d);
> char *psz_mes=cdda_messages(d);
>
> if (psz_mes || psz_err)
> qDebug() << psz_err << psz_mes;
> if (psz_err) free(psz_err);
> if (psz_mes) free(psz_mes);
> if( !p_readbuf ) {
> qDebug() << "paranoia read error. Stopping.\n";
> break;
> }
>
> char *temp= (char*) p_readbuf;
> file.write(temp,(qint64)CDIO_CD_FRAMESIZE_RAW);
> }
> file.close();
>
>
> qDebug() << i_first_lsn << "\t" << i_last_lsn ;
> qDebug() << cdda_track_firstsector(d,i_track);
> }
> paranoia_free(p);
>
> cdda_close(d);
>
> return;
>
--
View this message in context:
http://www.nabble.com/44-bit-difference-tp23065170p23082304.html
Sent from the Gnu - Libcdio - Help mailing list archive at Nabble.com.