OpenAL Tutorial pt.1 | Init and Play Sound Effects
Vložit
- čas přidán 14. 06. 2024
- Thanks for checking out a video on Code, Tech, and Tutorials.
OpenAL Playlist: • OpenAL Tutorial pt.1 |...
Source Code: github.com/codetechandtutoria...
REFERENCES
-----------------------------------------------------------
openal: openal.org/
openal-soft github: github.com/kcat/openal-soft
openal pdf doc: www.openal.org/documentation/...
indiegamedev guide: indiegamedev.net/2020/02/15/t...
thinmatrix guide: • OpenAL 3D Audio Tutori...
vcpkg: github.com/microsoft/vcpkg
my vcpkg guide: • VCPKG TUTORIAL | Easy ...
visual studio community: visualstudio.microsoft.com/vs...
-----------------------------------------------------------
TIMESTAMPS
--------------------
0:00 - intro
0:11 - expectations
0:58- resource references
3:54 - visual studio and vcpkg
6:01 - init visual studio project
7:15 - SoundDevice class code
8:16 - SoundDevice class code explained
9:32 - SoundBuffer class code
10:35 - SoundBuffer class code explained
14:41 - Load a sound
17:02 - SoundSource class code
18:12 - SoundSource class code explained
22:20 - Testing final results
23:10 - outro
--------------------
Help this channel on Patreon: / codetechtuts
Business inquiries: codetechtuts@gmail.com - Věda a technologie
Thanks for the walkthrough, Gilfoyle! Glad to see you landed on your feet after the collapse of Pied Piper.
Me too!
Thanks for the video, it was super helpful! I'm working on a game and left the audio to last because "audio's easier than graphics". Just a note, I'm sure this is mentioned in future videos but I had fun with it: if multiple sounds are played at once within a game loop with the same sound source, then race conditions seem to be messing with the sound selection. The ideal solution is probably semaphores or something, but ain't nobody got time for that, so I created a sound source for each different sound (within reason).
Thank you! Appreciate this clarification, got it working in my project immediately :)
Great video!
glad I'm from the FUTURE™
I read the indiegamedev article, and now I so wanna rewrite the code to use Concepts instead of the ugly enable_if clauses
I'll be sure to give it a try
Thanks a lot!
When I try to use this as a dll module for Lua, then sf_open in SoundBuffer::addSoundEffect does not work properly.
Any ideas?
Hello I’m studying openAL for C++
if I using multi soundDevice how to init device?
Hi my friend,
I notice that the sound will lost after plugging/unplugging headphone.
It may be fine after having OpenAL upgraded to the latest version( openal32.dll + wrap_oal.dll ). But my tests confirmed that OpenAL did not fix the problem for all hardwares, particularly audio adapter jack headphone.
would you mind to take a look at this issue, and give your idea, please?
Regards,
I noticed it is a pretty common issue in older games. Unless OpenAL didn't provided some way to detect if device was somewhat changed I think it isn't possible to fix. If there is a callback or some flag that is changed or something else then I think you would need to reinitiailize entire OpenAL device, context etc.
Does this also work on Linux Ubuntu ?
I cant find a way to make sounds on Linux and only getting OpenAL suggestions but no one is showing how to use at Linux CPP
should work - you'll need this `sudo apt-get install libopenal-dev`
optionally there is sdl2_mixer, fmod, and probably more. I haven't used them all.
I am using Ubuntu 20.04 and entered the code of the first part of the tutorial with the Sound Device class. When I run the program I get
[ALSOFT] (WW) Failed to open playback device: Could not open /dev/dsp: No such file or directory
[ALSOFT] (WW) Error generated on device (nil), code 0xa004
terminate called after throwing an instance of 'char const*'
Aborted (core dumped)
Any idea why this is happening?
Make sure that OpenAL Soft can find an audio backend like, for example, PulseAudio.
It installed by me automatically. Will anything bad happen when i uninstall it?
It is now 3 years years 2024, and I find myself asking this same question. How the heck did it got in my system? Can I remove it? What would happen if I do?
@@5taEspadaDRHey, I uninstalled it and I believe nothing happened
I actually thought you meant effects like reverb, chorus or distortion
I would like to get to that sometime but recently I've been mostly studying graphics and software architecture