Results 1 to 2 of 2

Thread: filetoaudio error on linux

  1. #1
    Junior Member
    Join Date
    Dec 2005
    Posts
    2

    filetoaudio error on linux

    Hi,

    I'm having some problems running the 'filetoaudio' sample application on my Debian GNU/Linux box. When i run the application I get:
    $ ./filetoaudio -d "OSS audio device" -I 0 -j "speaker output" -v /home/dani/development/OpenML/tone.wav
    Reading from file '/home/dani/development/OpenML/tone.wav'
    Sampling rate: 44100 Hz, Mono
    Using jack: speaker output
    Cannot open path: ML_STATUS_INTERNAL_ERROR
    Insufficient data to compute effective transfer rate.

    I've noticed that when I compile my dummy application (at the end of this message) whith gcc,it seems to work fine:
    $ gcc mlTest.c -lML -lMLU -o testML
    $ ./testML
    deviceName: 'OSS audio device'
    jackName: 'speaker output'
    mluFindDeviceByName: ML_STATUS_NO_ERROR
    mluFindJackByName: ML_STATUS_NO_ERROR
    mluFindPathToJack: ML_STATUS_NO_ERROR
    mlOpen: ML_STATUS_NO_ERROR
    mlSetControls: ML_STATUS_NO_ERROR
    mlClose: ML_STATUS_NO_ERROR

    but, if I link against the audiofile library I get this output:
    $ gcc mlTest.c -lML -lMLU -laudiofile -o testML
    $ ./testML
    deviceName: 'OSS audio device'
    jackName: 'speaker output'
    mluFindDeviceByName: ML_STATUS_NO_ERROR
    mluFindJackByName: ML_STATUS_NO_ERROR
    mluFindPathToJack: ML_STATUS_NO_ERROR
    mlOpen: ML_STATUS_INTERNAL_ERROR

    I also get this output when I use the g++ instead of gcc ( even if the audiofile library is not present at linking):
    $ g++ mlTest.c -lML -lMLU -o testML
    $ ./testML
    deviceName: 'OSS audio device'
    jackName: 'speaker output'
    mluFindDeviceByName: ML_STATUS_NO_ERROR
    mluFindJackByName: ML_STATUS_NO_ERROR
    mluFindPathToJack: ML_STATUS_NO_ERROR
    mlOpen: ML_STATUS_INTERNAL_ERROR

    Does someone know what I'm doing wrong?

    Thanks.

    $ mlquery
    SYSTEM: earth.(none)
    active UST: (default software UST source)
    DEVICES:
    nullXcode:0
    OSS audio device:0

    $ g++ --version
    g++ (GCC) 3.3.5 (Debian 1:3.3.5-13)

    $ uname -ros
    Linux 2.6.11.7-mppe GNU/Linux

    ###################### dummy #################################
    const char* jackName = "speaker output";
    const char* deviceName = "OSS audio device";


    status = mluFindDeviceByName( ML_SYSTEM_LOCALHOST, deviceName, &devId); // find the first physical device that matches AUDIO_DEVICE name
    status = mluFindJackByName( devId, jackName, &jackId);
    status = mluFindPathToJack( jackId, &pathId, NULL); // find an output path that goes through that jack
    status = mlOpen( pathId, NULL, &openPath);
    if ( status != ML_STATUS_NO_ERROR ){return -1};

    MLpv controls[5];
    MLreal64 gain = -12; /* decibels */
    controls[0].param = ML_AUDIO_FORMAT_INT32;
    controls[0].value.int32 = ML_AUDIO_FORMAT_S16;
    controls[1].param = ML_AUDIO_CHANNELS_INT32;
    controls[1].value.int32 = 1;
    controls[2].param = ML_AUDIO_GAINS_REAL64_ARRAY;
    controls[2].value.pReal64 = &gain;
    controls[2].length = 1;
    controls[3].param = ML_AUDIO_SAMPLE_RATE_REAL64;
    controls[3].value.real64 = 44100.0;
    controls[4].param = ML_END;

    status = mlSetControls( openPath, controls);
    mlClose( openPath);
    ################################################## ###

  2. #2
    Junior Member
    Join Date
    Dec 2005
    Posts
    2
    The problem is solved reinstalling the following packages( I think that this is not necessary...):
    libaudiofile-dev - Open-source version of SGI's audiofile library (header files)
    libaudiofile0 - Open-source version of SGI's audiofile library

    compiling whith gcc (not g++....), and executing the application ( filetoaudio) as root....

    Peace!

Similar Threads

  1. fatal error C1189: #error : ERROR: Use of C runtime library
    By gjermani in forum OpenGL ES general technical discussions
    Replies: 1
    Last Post: 09-24-2007, 03:02 AM
  2. how to use on Embedded linux or linux?
    By Ulimit77 in forum OpenGL ES general technical discussions
    Replies: 1
    Last Post: 05-29-2005, 07:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •