help-octave
[Top][All Lists]
Advanced

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

Re: audio check?


From: Jim Langston
Subject: Re: audio check?
Date: Thu, 06 Sep 2007 10:53:22 -0400
User-agent: Thunderbird 1.5.0.8 (X11/20061204)

Hi John,

Isolating down a little the old fashion way

In oct-stream.cc

             printf("Getting ready to read\n") ;
is.read (u.buf, sizeof (typename octave_type_traits<READ_T>::val_type));
             printf("Done Reading\n") ;

This method never returns


octave:1> A = [1:10; 1:10]/10;
octave:2> wavwrite("a.wav", A);
octave:3> [B, samples_per_sec, bits_per_sample] = wavread("a.wav");
Getting ready to read
^C^CPress Control-C again to abort.
^Cpanic: Interrupt -- stopping myself...
attempting to save variables to `octave-core'...
save to `octave-core' complete

bash-3.00$

Jim

As I was stopping in the debugger

(dbx) where
current thread: address@hidden
 [1] fgetc(0xfbe82ad8, 0x0), at 0xfbe10b8d
=>[2] c_file_ptr_buf::underflow_common(this = 0x87a7950, bump = false), line 70 in "c-file-ptr-stream.cc"
 [3] c_file_ptr_buf::underflow(this = 0x87a7950), line 53 in "unknown"
[4] std::basic_istream<char,std::char_traits<char> >::read(0x87a78e0, 0x8045ab2, 0x1), at 0xfbf7aaa7 [5] do_read<NDArray,unsigned char>(strm = STRUCT, nr = 4, nc = 1, block_size = 1, skip = 0, do_float_fmt_conv = false, from_flt_fmt = flt_fmt_ieee_little_endian, count = 0), line 3122 in "unknown"

(dbx) where
current thread: address@hidden
[1] std::basic_istream<char,std::char_traits<char> >::read(0x87a78e0, 0x8045ab2, 0x1), at 0xfbf7aaaa =>[2] do_read<NDArray,unsigned char>(strm = STRUCT, nr = 4, nc = 1, block_size = 1, skip = 0, do_float_fmt_conv = false, from_flt_fmt = flt_fmt_ieee_little_endian, count = 0), line 3122 in "unknown"


John W. Eaton wrote:
On  5-Sep-2007, Jim Langston wrote:

| It looks like a loop:
| | (dbx) cont
| ^Cdbx: warning: Interrupt ignored but forwarded to child.
| address@hidden (address@hidden) signal INT (Interrupt) in std::char_traits<char>::eof at | 0xfbef0124
| 0xfbef0124: eof       : movl     $0xffffffff,%eax
| Current function is c_file_ptr_buf::underflow_common
|    72         if (! bump
| (dbx) list
|    72         if (! bump
|    73   #if defined (CXX_ISO_COMPLIANT_LIBRARY)
|    74             && c != traits_type::eof ())
|    75   #else
|    76             && c != EOF)
|    77   #endif
|    78           ungetc (c, f);
| 79 | 80 return c;
|    81       }
| (dbx) cont
| ^Cdbx: warning: Interrupt ignored but forwarded to child.
| address@hidden (address@hidden) signal INT (Interrupt) in c_file_ptr_buf::underflow at line 53 | in file "c-file-ptr-stream.h"
|    53     int_type underflow (void) { return underflow_common (false); }
| (dbx) list
|    53     int_type underflow (void) { return underflow_common (false); }
| 54 | 55 int_type uflow (void) { return underflow_common (true); } | 56 | 57 int_type pbackfail (int_type); | 58 | 59 std::streamsize xsputn (const char*, std::streamsize); | 60 | 61 std::streamsize xsgetn (char *, std::streamsize); | 62 | (dbx) cont
| ^Cdbx: warning: Interrupt ignored but forwarded to child.
| address@hidden (address@hidden) signal INT (Interrupt) in _ungetc_unlocked at 
0xfbe151d1
| 0xfbe151d1: _ungetc_unlocked+0x0011:    addl     $0x00069e30,%ebx
| Current function is c_file_ptr_buf::underflow_common
|    78           ungetc (c, f);
| (dbx)

The next question is why is it looping?  Is it at the end of the file?
Are we incorrectly trying to put EOF back on the input stream?  If so,
what is the source of that error?  It looks like this must be
happening in one of the calls to fread in wavread.m.  Can you
determine which call to fread it is, and whether the data that has
been read up to that point is correct?

jwe


--
/////////////////////////////////////////////

Jim Langston
Sun Microsystems, Inc.

(877) 854-5583 (AccessLine)
AIM: jl9594
address@hidden



reply via email to

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