Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:5220] Re: New Csound5 File release for MinGW with ASIO

Date2004-08-15 21:17
From"gogins@pipeline.com"
Subject[CSOUND-DEV:5220] Re: New Csound5 File release for MinGW with ASIO
Thanks for the more detailed information.

I'm not sure what your problem is now. I can interrupt a performance just
fine with control-C. Possibly this is peculiar to your driver. 

At any rate, it's clear that for whatever reason, Csound is not closing the
ASIO driver, probably by not calling Pa_AbortStream.

There are other options I can pursue to close the PortAudio stream at end
of performance. Handling control-C was the easiest to do. Before I fixed up
control-C, my system's behavior was very similar to what you describe. Is
it possible you don't have the very latest sources? If you do you should
see "Csound tidy up: Interrupt" right after you do control-C.

I may have to give this some thought.

Original Message:
-----------------
From: Art Hunkins abhunkin@uncg.edu
Date: Sun, 15 Aug 2004 15:13:04 -0400
To: csound-dev@eartha.mills.edu
Subject: [CSOUND-DEV:5218] Re: New Csound5 File release for MinGW with ASIO


Hi, Michael,

Thanks for this additional info.

Actually I did read the .pdf doc and followed instructions. Though I didn't
mention it, I did try CSOptions using both -b10 and -B10, and got identical
results (I figured you may have needed both statements).

The reason I'm using "-b10" is simply because 10=ksmps, and it is a current
requirement. I can report that this works on my machine now (even mono)
under the correct circumstances (see below). The greatly reduced latency is
real nice, though in my case, not at all a necessity.

What is causing my trouble, it turns out, is the following: when command
lines are set correctly, an initial run goes fine *until the end*. Even when
time has completely elapsed, my run does *not* return to C-prompt. It seems
to hang in the process of returning the third/final temp file to the system.
Drastic measures are then required to close the DOS window, and all runs
thereafter fail with the following:

Found 1 PortAudio devices:
Device  0: ASIO Echo Gina/Darla/Layla
           Maximum channels in:       4
           Maximum channels out:     10
           Default sample rate:   44100.000
Suggested PortAudio output latency = 0.000454 seconds.
paBlockingWriteOpen: nchnls 1 sr 22050.000000 maxLag 10 device 0
paBlockingWriteOpen returned -9999.
PortAudio error -9999: Unanticipated host error.
Unable to open PortAudio output device.

Rebooting starts the whole process over again.

The same kind of problem exists with respect to trying to stop a performance
mid-stream (rather than let time elapse). Drastic end measures are required,
and subsequent runs repeat the above error; reboot (restart is OK) is
required. I've tried all kinds of keystroke combos - including Ctrl-C,
Ctrl-Break, Alt-F4, Alt-Esc, Esc - you name it. (Only Ctrl-Alt-Del, clicking
on Olddosapp will close the window and exit.)

Could you please investigate this? I'll be happy to try out different
suggestions that may be appropriate for my particular system.

Art Hunkins

P.S. The sample file (trimmed to 30") is attached. Except for that fact,
plus a different output device number (zero here), it's identical to the one
you sent.

----- Original Message -----
From: 
To: "Csound Developers Discussion List" 
Sent: Sunday, August 15, 2004 11:58 AM
Subject: [CSOUND-DEV:5216] Re: New Csound5 File release for MinGW with ASIO


There are two problems. One is my fault, and one is your fault.

Your problem is that you did not follow the advice in csound.pdf for ASIO.
I have amended your csd to use a command line similar to the example in
csound.pdf. The amended csd works for me (attached).

It may also be a problem that your .csd calls for a very low latency of
half a millisecond (though that does work on my very fast Windows XP
notebook with an M-Audio driver).

And it may also be a problem that your driver has 4 in 10 out, but you have
a mono csd. But my driver has 2 in and 2 out, yet it handles your csd OK,
so your csd should work for you, I guess.

My problem is that the advice in csound.pdf is not quite correct. The
example command line is correct and does work, but the text is not quite
correct. I should have said that BOTH the -B AND the -b options must match
ksmps, not just the -b option. I have fixed up csound.pdf in CVS.

This brings us back to the question of getting rid of the intermediate
audio buffers (controlled by the -b option) in Csound 5, which I would like
to do. I need to hear from John ffitch about this.

Original Message:
-----------------
From: Art Hunkins abhunkin@uncg.edu
Date: Sat, 14 Aug 2004 23:25:28 -0400
To: csound-dev@eartha.mills.edu
Subject: [CSOUND-DEV:5215] Re: New Csound5 File release for MinGW with ASIO


Hi, Michael,

I ran the attached simple file with the new CS5 file release; its failed
output messages are recorded below.

This is the output without the suggested "-b10" (=ksmps) included in the
command line. With "-b10" added, the output is the same except that
maxlag=10 and anticipated latency, of course, only a small fraction of a
second.

Csound5 is finding only one installed driver, ASIO, which it seems to be
identifying as device 0. This is why I specify
-odac0 as a CS option.

What have I done wrong?

Art Hunkins

C:\Csound5>csound schedkwhen.csd
Using default language
0dBFS level = 32767.0
Csound version 5.00 beta (double samples) Aug 12 2004
libsndfile-1.0.10pre6
UnifiedCSD:  schedkwhen.csd
STARTING FILE
Creating options
Creating orchestra
Creating C:\WINDOWS\TEMP\cs2.orc (7803BC10)
Creating score
orchname:  C:\WINDOWS\TEMP\cs2.orc
scorename: C:\WINDOWS\TEMP\cs3.sco
orch compiler:
36 lines read
        instr   1
        instr   2
sorting score ...
        ... done
Csound version 5.00 beta (double samples) Aug 12 2004
0dBFS level = 32767.0
orch now loaded
audio buffered in 16384 sample-frame blocks
Found 1 PortAudio devices:
Device  0: ASIO Echo Gina/Darla/Layla
           Maximum channels in:       4
           Maximum channels out:     10
           Default sample rate:   44100.000
Suggested PortAudio output latency = 0.743039 seconds.
paBlockingWriteOpen: nchnls 1 sr 22050.000000 maxLag 16384 device 0
paBlockingWriteOpen returned -9999.
PortAudio error -9999: Unanticipated host error.
Unable to open PortAudio output device.
inactive allocs returned to freespace
end of score.              overall amps:      0.0
           overall samples out of range:        0
0 errors in performance
Removing temporary file C:\WINDOWS\TEMP\cs4 ...
Removing temporary file C:\WINDOWS\TEMP\cs3.sco ...
Removing temporary file C:\WINDOWS\TEMP\cs2.orc ...

----- Original Message -----
From: 
To: "Csound Developers Discussion List" 
Sent: Saturday, August 14, 2004 3:33 PM
Subject: [CSOUND-DEV:5213] New Csound5 File release for MinGW with ASIO


I have uploaded a new zip file for Csound 5 and CsoundVST with prebuilt
binaries for Windows compiled with MinGW, and sources for all platforms, to
SourceForge at:

    http://sourceforge.net/projects/csound

Changes in this release:

-- The PortAudio driver now uses ASIO with a blocking wrapper to perform
   low-latency audio input and output on Windows. Output latency as little
   as 3 milliseconds was tested on Windows XP. Input has not been tested!

-- The csound.pdf file has been updated regarding ASIO. Read this BEFORE
   you try using real-time audio!

-- The csound.pdf file's sections have been re-ordered to make it easier
   for beginners to get started with Csound 5.






--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .




--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .