libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libcdio-devel] Re: nrg audio not correct with dao


From: Robert William Fuller
Subject: [Libcdio-devel] Re: nrg audio not correct with dao
Date: Thu, 20 Mar 2008 04:16:18 -0400
User-agent: Thunderbird 2.0.0.6 (X11/20071013)

Robert William Fuller wrote:

snip

diff -up nrg.c.~1.26.~ nrg.c
--- nrg.c.~1.26.~       2008-03-19 21:40:29.000000000 -0400
+++ nrg.c       2008-03-20 03:51:28.000000000 -0400
@@ -893,9 +893,22 @@ _read_audio_sectors_nrg (void *p_user_da
                          unsigned int nblocks)
 {
   _img_private_t *p_env = p_user_data;
-
   CdioListNode_t *node;

+  if (p_env->is_dao) {
+    int ret;
+
+    ret = cdio_stream_seek (p_env->gen.data_source,
+ (lsn + CDIO_PREGAP_SECTORS) * CDIO_CD_FRAMESIZE_RAW, SEEK_SET);
+    if (ret!=0) return ret;
+
+    ret = cdio_stream_read (p_env->gen.data_source, data,
+              CDIO_CD_FRAMESIZE_RAW, nblocks);
+
+    /* ret is number of bytes if okay, but we need to return 0 okay. */
+    return ret == 0;
+  }
+

I made a minor correction.  New code goes after following test:

   if (lsn >= p_env->size)
     {
       cdio_warn ("trying to read beyond image size (%lu >= %lu)",

I'm tired.  It's clearly time to quit for the night :-)

I still have to get cd text working in Nero, but maybe tomorrow.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]