SDL 2 Made Easy Tutorial 19 - Mixer [Sound & Music]

preview_player
Показать описание

Also follow me on social media :D

Steam ID: CodingMadeEasy

Feel free to download my apps as well!

Driving Frenzy
----------------------------

Рекомендации по теме
Комментарии
Автор

Hi CodingMadeEasy, even though this is an old tutorial, you just helped me with one thing i had trouble with in my game engine, i don't normally follow tutorials anymore, but man did you just save my life or what :D i have the Mix_PlayingMusic to -1 and i just couldn't understand why it wouldn't work but i tried to set it to 0 like you mention in this tutorial and it works now, now i can finally play a playlist :D Thanks a million for this tutorial!

nutcrackzengine
Автор

For playing a sound, the loop number represents how many times to LOOP it. So, if you put 1 in there, it will play it once, then loop it once (for a total of two times). When you put 2 in there, that means play it once, then loop it two more times, for a total of 3. Zero just play it once and don't loop it.

NeilRoy
Автор

My program compiles correctly, no error but it wasnt playing music

ngochienvu
Автор

If anyone gets a program that compiles correctly but doesn't play music make sure you didn't miss the ! on line 59 :)

hoi
Автор

Hola buen vídeo. Una pregunta: quisiera saber si ¿hay alguna forma de hacer una animación al ritmo del sonido? por decir un ejemplo el vúmetro (indicador de volumen). He leído que con SDL_mixer es posible, inclusive apliqué una función llamada Mix_SetPostMix, en donde unos de los parámetros " *stream " es la que contiene la data/seña del sonido en el instante que se emite, ahora mi problema es que no se interpretar esos datos ya que conozco poco sobre el tema de audio.

islamlinarez
Автор

so hearing music and soundeffect at the same time works?

Banefane
Автор

Thanks for that Tutorial, great Work!

volidot
Автор

How do you get the music playing if you're using SDL_SCANCODE from the previous tutorials

josepena-garcia
Автор

Thank you. This video was just what I needed.
I have tried reading tutorials and they will more-or-less just throw hundreds of lines of code at you with no explanation and half of it wont compile because they didn't tell you which libraries you need or anything.

Question:
I tried using a midi file instead of a MP3 for music. Playing and stopping it seems to work fine. But pausing the music does not seem to work. Is there anything I can do to get midi's to work or do I have to convert them to MP3's? Because I really want to keep the midi's since they are very easy to work with in GarageBand and other programs.

P.S. Your video helped me so much I gave you a like and a subscribe. Keep making these great videos they are really appreciated.

iwird
Автор

What if I don't use Visual Studio?

ChaoDee
welcome to shbcf.ru