Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jun 2016 18:46:12 +0200
From:      cpghost <cpghost@cordula.ws>
To:        freebsd-ports@freebsd.org
Subject:   audio/csound6 endless loop and creates empty sound files
Message-ID:  <595c83d9-abb6-93db-51e5-d5e46f6d6c81@cordula.ws>

next in thread | raw e-mail | index | archive | help
Hello,

has anyone used audio/csound6 recently on FreeBSD?
It compiles just fine, but it creates bogus output,
AFAICS.

Here's an example, simplified from Chapter 1 of The CSound Book:

http://www.csounds.com/chapter1/

$ cat e1.orc
sr = 44100
kr = 4410
ksmps = 10
nchnls = 1

instr   101
a1      oscil   10000, 440, 1
        out     a1
endin

$ cat e1.sco
; Function 1 uses the GEN10 subroutine to compute a sine wave
f 1        0 4096 10  1 

;inst   start   duration
i 101   0       3

Running "csound e1.orc e1.sco" on Linux would create a file
"test.wav" with a 440 Hz tone that can be rendered with any
program like mplayer, vlc, etc... It would also display a
sine wave as text.

On FreeBSD, csound just runs in an endless loop, and test.wav
grows and grows. If I stop csound with Ctrl-C, and inspect
test.wav with hd(1), there's a header, followed by 00-bytes;
that's all. I can vary the output format, it doesn't matter:
always 00 samples are being output in an endless loop:

$ csound e1.orc e1.sco
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 6.06 (double samples) Jun 29 2016
libsndfile-1.0.26
orchname:  e1.orc
Elapsed time at end of orchestra compile: real: 0.004s, CPU: 0.000s
sorting score ...
        ... done
Elapsed time at end of score sort: real: 0.004s, CPU: 0.000s
--Csound version 6.06 (double samples) Jun 29 2016
graphics suppressed, ascii substituted
0dBFS level = 32768.0
orch now loaded
audio buffered in 256 sample-frame blocks
writing 512-byte blks of shorts to test.wav (WAV)
SECTION 1:
^C
csound command: Interrupt
csoundPerform(): stopped.
inactive allocs returned to freespace
end of score.              overall amps:      0.0
           overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 9.596s, CPU: 9.539s
256 512 sample blks of shorts written to test.wav (WAV)


$ ls -l test.wav
-rw-r--r--  1 cpghost  users  221763644 Jun 29 18:35 test.wav

$ hd test.wav
00000000  52 49 46 46 34 d8 37 0d  57 41 56 45 66 6d 74 20  |RIFF4.7.WAVEfmt |
00000010  10 00 00 00 01 00 01 00  44 ac 00 00 88 58 01 00  |........D....X..|
00000020  02 00 10 00 64 61 74 61  10 d8 37 0d 00 00 00 00  |....data..7.....|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
0d37d830

Needless to say that this output file plays silent.

So, there's something definitively broken in audio/csound6, because this
happens ONLY on FreeBSD, not on Linux.

More details on the port:

$ uname -a
FreeBSD phenom.fritz.box 10.3-STABLE FreeBSD 10.3-STABLE #0 r299381: Tue May 10 21:34:52 CEST 2016     root@phenom.fritz.box:/usr/obj/usr/src/sys/GENERIC  amd64

$ cat /var/db/ports/audio_csound6/options
# This file is auto-generated by 'make config'.
# Options for csound6-6.06_1
_OPTIONS_READ=csound6-6.06_1
_FILE_COMPLETE_OPTIONS_LIST=ALSA CURL DSSI FLTK FLUIDSYNTH HDF5 JACK LUA NLS OPENMP OSC PNG PORTAUDIO PULSEAUDIO
OPTIONS_FILE_UNSET+=ALSA
OPTIONS_FILE_SET+=CURL
OPTIONS_FILE_SET+=DSSI
OPTIONS_FILE_SET+=FLTK
OPTIONS_FILE_SET+=FLUIDSYNTH
OPTIONS_FILE_SET+=HDF5
OPTIONS_FILE_UNSET+=JACK
OPTIONS_FILE_SET+=LUA
OPTIONS_FILE_SET+=NLS
OPTIONS_FILE_SET+=OPENMP
OPTIONS_FILE_SET+=OSC
OPTIONS_FILE_SET+=PNG
OPTIONS_FILE_UNSET+=PORTAUDIO
OPTIONS_FILE_SET+=PULSEAUDIO

I've tried various options, and recompiled audio/libsndfile too, but
still couldn't get csound6 to work correctly.

Any advice?

Thanks,

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?595c83d9-abb6-93db-51e5-d5e46f6d6c81>