Audio issue

This topic contains 3 replies, has 2 voices, and was last updated by  MaNiAc 3 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #68

    fafase
    Participant

    Hi,

    We are facing an issue for Audio. For some reason, this below:

    ` public static void PlaySound(string soundId, bool loop = false)
    {
    int channel = FindFreeChannel();
    Audio audio = FindAudio(soundId);
    if (channel != -1 && audio != null)
    {
    Al.alSourceStop(channel);
    Al.alSourcei(channel, Al.AL_BUFFER, audio.bufferID);
    Al.alSourcef(channel, Al.AL_PITCH, 1.0f);
    Al.alSourcef(channel, Al.AL_GAIN, 1.0f);

    if (loop)
    Al.alSourcef(channel, Al.AL_LOOPING, 1);
    else
    Al.alSourcef(channel, Al.AL_LOOPING, 0);

    Al.alSourcePlay(channel);
    audio.channel = channel;
    }
    }`

    does not give any error but does not play any sound either. It gives us a channel, 0, we can see the audio file as Audio but no sound is getting out.

    Any ideas what is wrong?

    Fafase

    #69

    MaNiAc
    Member

    Hi there! I’ll try to reproduce the problem and get back to you asap.

    I’m not 100% sure that it’s the OpenAL binding or anything else…

    #70

    fafase
    Participant

    Hei,

    actually got fixed.
    wrap_oal.dll was missing and no complain so we did not see why at first but one of the students found it.

    Fafase

    #71

    MaNiAc
    Member

    Good to hear that! Btw this is something that an installer should solve in the future – e.g. the developer using TC should not be forced to mess around with copying .DLLs to here and there.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Posted in