0
0

Hi,

i just tryied fmod for linux (stable and devel) and from any example, i only get this :

*** glibc detected *** ./loadfrommemory: double free or corruption (out): 0x000000000061ab00 ***
======= Backtrace: =========
/lib/libc.so.6[0x7fbcaf852468]
/lib/libc.so.6(cfree+0x76)[0x7fbcaf853fa6]
/lib/libc.so.6(closedir+0xd)[0x7fbcaf87ad9d]
../../api/lib/libfmodex64.so(_ZN4FMOD9OutputOSS9enumerateEv+0x143)[0x7fbcb059d793]
../../api/lib/libfmodex64.so(_ZN4FMOD9OutputOSS4initEijPiiP17FMOD_SOUND_FORMATiiPv+0x3b)[0x7fbcb059da8b]
../../api/lib/libfmodex64.so(_ZN4FMOD7SystemI4initEijPv+0x3ed)[0x7fbcb059522d]
../../api/lib/libfmodex64.so(_ZN4FMOD6System4initEijPv+0x3b)[0x7fbcb058c1bb]
./loadfrommemory(__gxx_personality_v0+0x4bb)[0x401783]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7fbcaf7fd5c6]
./loadfrommemory(__gxx_personality_v0+0x51)[0x401319]
…….

… my system is Gentoo, x64, glibc installed is 2.9_p20081201-r2, oss4 for sound, 3 soundcards in system (on-board intel hd, audigy ls, m-audio audiophile 2496).

10x,
Daniel

  • You must to post comments
0
0

Can you try linking with the logging version of FMOD and posting the output you get on the TTY?

I just had a quick look at the FMOD OSS code and it appears there could be a problem if you have a lot of sound card devices. I will correct the issue for our next release, but if you can post the TYY output we can confirm that is what you are experiencing.

  • You must to post comments
0
0

[quote:38z1at43]Can you try linking with the logging version of FMOD and posting the output you get on the TTY?[/quote:38z1at43]
How do i do that ? Where i find logging version of FMOD ?

And another problem:
On my home server (Gentoo too, oss4 with libsalsa compiled, with 2 soundcards – intel onboard and audigy 2) if i try multispeaker example, with ALSA i get :

Heracles multispeakeroutput # ./multispeakeroutput
ALSA lib pcm_direct.c:1479:(_snd_pcm_direct_get_slave_ipc_offset) Invalid value for card
FMOD error! (62) Error initializing output device.

and if i change to FMOD_OUTPUTTYPE_OSS i get:

Heracles multispeakeroutput # ./multispeakeroutput
FMOD error! (61) Soundcard does not support the minimum features needed for this soundsystem (16bit stereo output).

/dev/dsp is linked to multichannel output of Intel HD
This is ossinfo:

Version info: OSS 4.2 (b rc3/200908110548) (0x00040100) GPL
Platform: Linux/x86_64 2.6.29-gentoo-r5 #1 SMP Sat Jun 27 19:08:43 EEST 2009 (Heracles)

Number of audio devices: 15
Number of audio engines: 23
Number of MIDI devices: 1
Number of mixer devices: 2

Device objects
0: osscore0 OSS core services
1: oss_hdaudio0 Intel HD Audio interrupts=10484 (38577)
HD Audio controller Intel HD Audio
Vendor ID 0x8086293e
Subvendor ID 0x80863001
Codec 2: STAC9271D (0x83847627/0x80863001)
2: oss_sblive0 SB Audigy2 interrupts=28093 (28216)
3: oss_usb0 USB audio core services

MIDI devices (/dev/midi*)
0: Audigy UART (MIDI port 1 of device object 2)

Mixer devices
0: High Definition Audio STAC9271D (Mixer 0 of device object 1)
1: SB Audigy2 (STAC9750) (Mixer 0 of device object 2)

Audio devices
HD Audio play front /dev/oss/oss_hdaudio0/pcm0 (device index 0)
HD Audio play center/LFE /dev/oss/oss_hdaudio0/pcm1 (device index 1)
HD Audio play rear /dev/oss/oss_hdaudio0/pcm2 (device index 2)
HD Audio play side /dev/oss/oss_hdaudio0/pcm3 (device index 3)
HD Audio play headphone /dev/oss/oss_hdaudio0/pcm4 (device index 4)
HD Audio play spdif-out /dev/oss/oss_hdaudio0/spdout0 (device index 5)
HD Audio rec input1-mux /dev/oss/oss_hdaudio0/pcmin0 (device index 6)
HD Audio rec input2-mux /dev/oss/oss_hdaudio0/pcmin1 (device index 7)
HD Audio rec input3-mux /dev/oss/oss_hdaudio0/pcmin2 (device index 8)
SB Audigy2 main /dev/oss/oss_sblive0/pcm0 (device index 9)
SB Audigy2 front out /dev/oss/oss_sblive0/pcm1 (device index 10)
SB Audigy2 side out /dev/oss/oss_sblive0/pcm2 (device index 11)
SB Audigy2 center/lfe out /dev/oss/oss_sblive0/pcm3 (device index 12)
SB Audigy2 raw S/PDIF (output only) /dev/oss/oss_sblive0/pcm4 (device index 13)
SB Audigy2 5.1 output device /dev/oss/oss_sblive0/pcm5 (device index 14)

Nodes
/dev/dsp -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_in -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_out -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_ac3 -> /dev/oss/oss_hdaudio0/spdout0
/dev/dsp_mmap -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_multich -> /dev/oss/oss_hdaudio0/pcm0

L.E.: i use OSS4 because is much much better than alsa, in this moment. I obtain a much clearer sound (yes !?!) from the same card, it already support software mixing (vmix), it’s amaizing. One year i triyed to use/configure soundcards like M-Audio Delta 1010 LT / 192 / 2496 with ALSA and was a pain to use dmix/dsnoop. When i changed to OSS4 (2 years ago) i had no problems. Even i use home, those 6 outputs (front/rear/center-lfe) like 3 differents stereo soundcards.

10x,
Daniel

  • You must to post comments
0
0

There is a version of FMOD in the api/libs directory with an L in the name, libfmodexL.so, if you link with this version you should see output on the TTY which will give more meaningful descriptions of the problem you are having.

  • You must to post comments
0
0

Hi,

generatetone with OUTPUTTYPE_OSS :

gentoo-amd64 generatetone # ./generatetone
FMOD: SystemI::init : FMOD Ex Version: 00042704
FMOD: SystemI::init : maxchannels = 32, flags = 00000000, extradriverdata = (nil)
FMOD: SystemI::close :
FMOD: SystemI::close : Stop all sounds
FMOD: SystemI::close : Shut down output.
FMOD: SystemI::close : Remove miscllaneous DSP stuff.
FMOD: SystemI::close : done.

FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp42
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp41
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp40
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp39
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp38
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp37
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp36
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp35
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp34
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp33
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp32
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp31
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp30
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp29
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp28
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp27
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp26
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp25
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp24
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp23
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp22
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp21
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp20
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp19
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp18
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp17
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp16
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp15
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp14
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp13
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp12
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp11
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp10
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp9
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp8
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp7
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp6
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp5
*** glibc detected *** ./generatetone: double free or corruption (out): 0x000000000061ab00 ***
======= Backtrace: =========
/lib/libc.so.6[0x7f3fbbf9a468]
/lib/libc.so.6(cfree+0x76)[0x7f3fbbf9bfa6]
/lib/libc.so.6(closedir+0xd)[0x7f3fbbfc2d9d]
../../api/lib/libfmodex64.so(_ZN4FMOD9OutputOSS9enumerateEv+0x1c8)[0x7f3fbcacd448]
../../api/lib/libfmodex64.so(_ZN4FMOD9OutputOSS4initEijPiiP17FMOD_SOUND_FORMATiiPv+0x3b)[0x7f3fbcacd74b]
../../api/lib/libfmodex64.so(_ZN4FMOD7SystemI4initEijPv+0x517)[0x7f3fbcac3377]
../../api/lib/libfmodex64.so(_ZN4FMOD6System4initEijPv+0x3b)[0x7f3fbcaba13b]
./generatetone(__gxx_personality_v0+0x44c)[0x401644]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7f3fbbf455c6]
./generatetone(__gxx_personality_v0+0x61)[0x401259]
======= Memory map: ========
00400000-00405000 r-xp 00000000 08:01 3900786 /0.TFM/.Programare/.Teste/FMOD/fmodapi42704linux64/examples/generatetone/generatetone
00604000-00605000 r–p 00004000 08:01 3900786 /0.TFM/.Programare/.Teste/FMOD/fmodapi42704linux64/examples/generatetone/generatetone
00605000-00606000 rw-p 00005000 08:01 3900786 /0.TFM/.Programare/.Teste/FMOD/fmodapi42704linux64/examples/generatetone/generatetonAborted

… but i have many old links, like /dev/dsp42 who point nowhere.
When i deleted old links and restarted oss4, all is ok, in stereo mode.

===============
Now, multichannel with oss4:

this is ossinfo:
gentoo-amd64 examples # ossinfo
Version info: OSS 4.2 (b rc3/200908100743) (0x00040100) GPL
Platform: Linux/x86_64 2.6.27-gentoo-r7 #1 SMP PREEMPT Wed Jan 14 11:44:55 EET 2009 (gentoo-amd64)

Number of audio devices: 20
Number of audio engines: 29
Number of MIDI devices: 1
Number of mixer devices: 3

Device objects
0: osscore0 OSS core services
1: oss_audigyls0 AudigyLS
2: oss_envy240 M Audio Audiophile 2496 interrupts=16 (414)
3: oss_hdaudio0 Intel HD Audio interrupts=398 (398)
HD Audio controller Intel HD Audio
Vendor ID 0x8086284b
Subvendor ID 0x80862504
Codec 2: STAC9271D (0x83847627/0x80862504)
4: oss_usb0 USB audio core services

MIDI devices (/dev/midi*)
0: M Audio Audiophile 2496 #1 (MIDI port 1 of device object 2)

Mixer devices
0: AudigyLS Mixer (Mixer 0 of device object 1)
1: M Audio Audiophile 2496 (Mixer 0 of device object 2)
2: High Definition Audio STAC9271D (Mixer 0 of device object 3)

Audio devices
AudigyLS front /dev/oss/oss_audigyls0/pcm0 (device index 0)
AudigyLS center/lfe /dev/oss/oss_audigyls0/pcm1 (device index 1)
AudigyLS surround /dev/oss/oss_audigyls0/pcm2 (device index 2)
AudigyLS 5.1 output /dev/oss/oss_audigyls0/pcm3 (device index 3)
M Audio Audiophile 2496 out1/2 /dev/oss/oss_envy240/pcm0 (device index 4)
M Audio Audiophile 2496 S/PDIF out /dev/oss/oss_envy240/spdout (device index 5)
M Audio Audiophile 2496 in1/2 /dev/oss/oss_envy240/pcmin0 (device index 6)
M Audio Audiophile 2496 S/PDIF in /dev/oss/oss_envy240/spdin (device index 7)
M Audio Audiophile 2496 input from mon. mixer /dev/oss/oss_envy240/mon (device index 8)
M Audio Audiophile 2496 (all outputs) /dev/oss/oss_envy240/10ch_out (device index 9)
M Audio Audiophile 2496 (all inputs) /dev/oss/oss_envy240/12ch_in (device index 10)
HD Audio play front /dev/oss/oss_hdaudio0/pcm0 (device index 11)
HD Audio play center/LFE /dev/oss/oss_hdaudio0/pcm1 (device index 12)
HD Audio play rear /dev/oss/oss_hdaudio0/pcm2 (device index 13)
HD Audio play side /dev/oss/oss_hdaudio0/pcm3 (device index 14)
HD Audio play headphone /dev/oss/oss_hdaudio0/pcm4 (device index 15)
HD Audio play spdif-out /dev/oss/oss_hdaudio0/spdout0 (device index 16)
HD Audio rec input1-mux /dev/oss/oss_hdaudio0/pcmin0 (device index 17)
HD Audio rec input2-mux /dev/oss/oss_hdaudio0/pcmin1 (device index 18)
HD Audio rec input3-mux /dev/oss/oss_hdaudio0/pcmin2 (device index 19)

Nodes
/dev/dsp -> /dev/oss/oss_audigyls0/pcm3
/dev/dsp_in -> /dev/oss/oss_audigyls0/pcm0
/dev/dsp_out -> /dev/oss/oss_audigyls0/pcm0
/dev/dsp_ac3 -> /dev/oss/oss_audigyls0/pcm0
/dev/dsp_mmap -> /dev/oss/oss_audigyls0/pcm0
/dev/dsp_multich -> /dev/oss/oss_audigyls0/pcm3
/dev/dsp_spdifout -> /dev/oss/oss_envy240/spdout

… /dev/dsp is linked to multichannel output.

But, multispeakeroutput give me this (with FMOD_OUTPUTTYPE_OSS):

gentoo-amd64 multispeakeroutput # ./multispeakeroutput
FMOD: SystemI::init : FMOD Ex Version: 00042704
FMOD: SystemI::init : maxchannels = 32, flags = 00000000, extradriverdata = (nil)
FMOD: SystemI::close :
FMOD: SystemI::close : Stop all sounds
FMOD: SystemI::close : Shut down output.
FMOD: SystemI::close : Remove miscllaneous DSP stuff.
FMOD: SystemI::close : done.

FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp19
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp18
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp17
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp16
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp15
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp14
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp13
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp12
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp11
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp10
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp9
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp8
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp7
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp6
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp5
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp4
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp3
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp2
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp1
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp0
FMOD: OutputOSS::init : Initializing.
FMOD error! (62) Error initializing output device.

and with /dev/dsp linked to stereo output, i get this:

gentoo-amd64 multispeakeroutput # ./multispeakeroutput
FMOD: SystemI::init : FMOD Ex Version: 00042704
FMOD: SystemI::init : maxchannels = 32, flags = 00000000, extradriverdata = (nil)
FMOD: SystemI::close :
FMOD: SystemI::close : Stop all sounds
FMOD: SystemI::close : Shut down output.
FMOD: SystemI::close : Remove miscllaneous DSP stuff.
FMOD: SystemI::close : done.

FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp19
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp18
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp17
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp16
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp15
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp14
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp13
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp12
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp11
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp10
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp9
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp8
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp7
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp6
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp5
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp4
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp3
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp2
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp1
FMOD: OutputOSS::enumerate() : Enumerating /dev/dsp0
FMOD: OutputOSS::init : Initializing.
FMOD: OutputOSS::init : Initialized.
FMOD: SystemI::init : Set up software engine
FMOD: OutputOSS::setDeviceParams : bits = 16 channels = 6 speed = 48000 bufferlen = 12288
FMOD: OutputOSS::setDeviceParams : Buffersize = 00003000
FMOD: OutputOSS::setDeviceParams : Fragment setting = 08x
FMOD: SystemI::close :
FMOD: SystemI::close : Stop all sounds
FMOD: SystemI::close : Free master channel group.
FMOD: SystemI::close : Remove ‘master’ sound group.
FMOD: SystemI::close : Shut down output.
FMOD: SystemI::close : Free software output.
FMOD: SystemI::close : Remove DSP Soundcard unit.
FMOD: SystemI::close : Remove miscllaneous DSP stuff.
FMOD: SystemI::close : done.

FMOD error! (61) Soundcard does not support the minimum features needed for this soundsystem (16bit stereo output).

10x,
Daniel

  • You must to post comments
0
0

Okay, the error you are getting is what I expected. FMOD usually caps the number of devices at 32 however you have more than that and the code wasn’t checking it properly. I have already patched this for our next release.

Now with multichannel the problem is fairly straight forward, OSS doesn’t support it. Well, specifically OSS v3 doesn’t support it which is what FMOD was designed around.

We plan to update OSS to be able to use the features of v4 like multichannel and meaningful device enumeration however our current recommendation is to use ALSA.

Finally the reason the multichannel example doesn’t work when you point /dev/dsp to the stereo device is because you are trying to initialize that device using 6 channels (which you can see in FMOD: OutputOSS::setDeviceParams). To avoid this you must change the speaker mode to FMOD_SPEAKERMODE_STEREO or FMOD_SPEAKERMODE_MONO.

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.