Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

OpenAL Linux No Sound


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 ProvenDantheman   Members   -  Reputation: 111

Like
0Likes
Like

Posted 11 March 2013 - 02:08 PM

Hello, I've been trying to program basic sound in linux with OpenAL. However, when I compile the code and run, I get no sound. I've linked to lopenal and lalut.

 

When I compile using this code, I get an error in the console that says dev/dsp can't be found...

 


alutInit(&argc, argv);
ALuint buffer = alutCreateBufferHelloWorld();
ALuint source; alGenSources(1, &source);
alSourcei(source, AL_BUFFER, buffer);
alSourcePlay(source);
return(0);

Edited by ProvenDantheman, 11 March 2013 - 02:08 PM.


Sponsor:

#2 __SKYe   Members   -  Reputation: 455

Like
0Likes
Like

Posted 11 March 2013 - 09:11 PM

I use OpenAL, but i'm not familiar with alut, and the alutCreateBufferHelloWorld() function, but i'm assuming that it creates a buffer, and loads an existing audio clip in it, so the error might be because that audio clip doesn't exist.

 

Do you have a "dev/dsp" folder with whatever audio file the application opens?

Honestly i don't think the function creates a sound on the fly, but loads an external clip, perhaps from the OpenAL framework?

 

Basically make sure the folder and whatever file it's needed exists in your computer, and it should work... I think...



#3 Bacterius   Crossbones+   -  Reputation: 3548

Like
1Likes
Like

Posted 12 March 2013 - 12:33 AM

/dev/dsp isn't a folder but a virtual device for processing audio under Linux. This likely means that while you've got the OpenAL headers and library, you're missing the actual OpenAL driver. What audio provider are you using? ALSA? PulseAudio? Something else?


"The best comment is a deleted comment."
website · blog

[maintenance in progress]


#4 ProvenDantheman   Members   -  Reputation: 111

Like
0Likes
Like

Posted 12 March 2013 - 02:04 PM

I'm fairly certain I'm using the most up to date version of pulse.



#5 ProvenDantheman   Members   -  Reputation: 111

Like
0Likes
Like

Posted 14 March 2013 - 02:26 PM

I'm about to explode. This problem is hindering me from getting anything done angry.png  I ran the command openal-info. This is my output...

Available playback devices:
    !!! none !!!
Available capture devices:
    !!! none !!!
Default playback device:
Default capture device:
ALC version: 1.1

!!! Failed to open default device !!!


Edited by ProvenDantheman, 14 March 2013 - 02:27 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS