Csound Csound-dev Csound-tekno Search About

[Cs-dev] libsndfile anomaly ?

Date2006-01-19 03:33
FromDavid Akbari
Subject[Cs-dev] libsndfile anomaly ?
Hello,

I seem to be encountering an anomaly when trying to load in sound files 
with libsndfile-1.0.12.

I was wondering if this is a Csound orchestra compiler error or an 
error in libsndfile ?

Appended is the output from Csound. The .csd example was the demix 
example Victor posted some days ago with commandline options:

-d -odac -b1024 -B16384 -+rtaudio=alsa

This is on Debian (unstable) kernel 2.6.14.

The audio file does not seem to be the issue as identical code seems to 
work just fine with libsndfile-1.0.11 on both Mac OS X 10.3.9 and 
Windows XP using this file as well as various other audio files as a 
source.

The resultant error happens no matter what audio file is selected as a 
source - the orc compiler thinks that the sr = the number of channels..

0dBFS level = 32768.0
Csound version 5.00.0 (float samples) Dec 29 2005
libsndfile-1.0.12
UnifiedCSD:  /home/daveakbari/Desktop/demix.csd
STARTING FILE
Creating options
Creating orchestra
Creating score
orchname:  /tmp/fileeor3ep.orc
scorename: /tmp/file2vH7hE.sco
rtaudio: ALSA module enabled
rtmidi: PortMIDI module enabled
orch compiler:
41 lines read
         instr   1
Elapsed time at end of orchestra compile: real: 0.003s, CPU: 0.010s
sorting score ...
         ... done
Elapsed time at end of score sort: real: 0.004s, CPU: 0.010s
Csound version 5.00.0 (float samples) Dec 29 2005
displays suppressed
0dBFS level = 32768.0
orch now loaded
audio buffered in 1024 sample-frame blocks
ALSA output: total buffer size: 16384, period size: 1024
writing 4096-byte blks of shorts to dac
SECTION 1:
ftable 1:
new alloc for instr 1:
diskin: opened '/media/sda1/mix.wav':
         0 Hz, 44100 channel(s), 25491455 sample frames
INIT ERROR in instr 1: diskin: number of output args inconsistent with 
number of file channels
al      ar      diskin  "/media/sda1/mix.wav"     1       0       1     
   0       0
           B  0.000 - note deleted.  i1 had 1 init errors
Score finished in csoundPerform().
inactive allocs returned to freespace
end of score.              overall amps:      0.0      0.0
            overall samples out of range:        0        0
1 errors in performance
Elapsed time at end of performance: real: 0.015s, CPU: 0.010s
0 4096-byte soundblks of shorts written to dac
end of widget thread


any help appreciated!


-David



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-01-19 08:05
FromErik de Castro Lopo
SubjectRe: [Cs-dev] libsndfile anomaly ?
David Akbari wrote:

> Hello,
> 
> I seem to be encountering an anomaly when trying to load in sound files 
> with libsndfile-1.0.12.



> diskin: opened '/media/sda1/mix.wav':
>          0 Hz, 44100 channel(s), 25491455 sample frames
> INIT ERROR in instr 1: diskin: number of output args inconsistent with 

It seems that you are trying to load a mono file into twe channels.

I would suggest that either:

  a) csound should flag this an an error

or

  b) it should convert the single channel into two channels.

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo
+-----------------------------------------------------------+
"life is too long to be an expert at harmful things, including 
such evilness as C++ and perl." -- Erik Naggum


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-01-19 09:35
FromIstvan Varga
SubjectRe: [Cs-dev] libsndfile anomaly ?
AttachmentsNone  

Date2006-01-19 09:51
FromErik de Castro Lopo
SubjectRe: [Cs-dev] libsndfile anomaly ?
Istvan Varga wrote:

> No, the file information printed is bogus (44100 channels ?), and suggests
> a binary incompatibility between the Csound library and libsndfile.

Oops, missed that :-).



> it is obvious that 'samplerate' is actually the upper 32 bits of 'frames'
> (i.e. zero), and 'channels' is the sample rate.
> The solution is probably to remove all old libsndfile and Csound headers
> and libraries, recompile and reinstall libsndfile 1.0.12

If you recompile libsndfile, make sure to run the test suite. Here's
what you do:

     ./configure
     make
     make check

The "make check" step runs the full test suite. If any test in
the test suite fails it will print an error message. If you 
see one of those, post it here.

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo
+-----------------------------------------------------------+
Microsoft VISTA : Virus Infection Spyware Trojans and Adware!


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net