Re: sound and music looping

2018-04-08 Thread AudioGames . net Forum — Developers room : Jaseoffire via Audiogames-reflector


  


Re: sound and music looping

While I am getting into c/c++, something  tells me there's going to be a bit more python in my future to go. Not to mension whatever they decide to teach the computer graphics courses in. Probably either java or c++, honestly. That being said, python is still a better choice when you've only got a weekend to work with. That being said, I would investigate fmod later on. For now, libaudioverse is what most of my projects are written with in mind. If there is a good python library for fmod, I might look at it over the summer, though.

URL: http://forum.audiogames.net/viewtopic.php?pid=358796#p358796




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: sound and music looping

2018-04-08 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: sound and music looping

@Jaseoffire, I'd highly recommend you use Fmod as your sound library. I've used it before; looping is very simple. Here's a good example on how to do it:// ... init code
// Create a function that displays errors in case FMOD failed to do something.
template void errcheck(funcname function, linenumber ln, FMOD_RESULT result) {
if(result!=FMOD_OK) {
MessageBox (NULL, FMOD_ErrorString(result), "Error", MB_OK);
}
}

// Initialize FMOD
FMOD::System *system;
// Do verification, ensure our FMOD version is correct.
unsigned int version = 0;
errcheck(__func__, __LINE__, FMOD::System_Create (&system)); // Create the system object.
errcheck(__func__, __LINE__, system->getVersion(&version)); // Get the version of FMOD we're running.
if (versioninit(4093, FMOD_INIT_NORMAL, (void*)0));
// Load a new sound, let's call it music.ogg.
FMOD::Sound *sound;
errcheck(__func__, __LINE__, system->createSound("music.ogg", FMOD_DEFAULT, 0, &sound));
sound->setMode(FMOD_LOOP_NORMAL);
// Play the sound.
FMOD::Channel *channel=0; // This is the channel we're going to be playing the sound on.
// Now, play our sound on this channel.
errcheck(__func__, __LINE__, system->playSound("music.ogg", 0, false, &channel));
// Set the sound volume to a lower volume so it doesn't blow out our ears! :)
errcheck(__func__, __LINE__, channel->setVolume(0.50));
// And then, when you want to unload the sound...
errcheck(__func__, __LINE__, channel->stop());
errcheck(__func__, __LINE__, sound->release());
// And now, release the system.
errcheck(__func__, __LINE__, system->close());
errcheck(__func__, __LINE__, system->release());That's all! It may seem like a lot of code, but in C/C++ you do this kind of thing every day. You could certainly trivialize this into functions, too.

URL: http://forum.audiogames.net/viewtopic.php?pid=358785#p358785




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: sound and music looping

2018-04-08 Thread AudioGames . net Forum — Developers room : Jaseoffire via Audiogames-reflector


  


Re: sound and music looping

So, does that mean I would have to perhaps cache the buffer? If I were to do so, how  would I go about doing that?

URL: http://forum.audiogames.net/viewtopic.php?pid=358746#p358746




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: sound and music looping

2018-04-08 Thread AudioGames . net Forum — Developers room : Jaseoffire via Audiogames-reflector


  


Re: sound and music looping

So, does that mean I would have to perhaps cache the buffer perhaps?

URL: http://forum.audiogames.net/viewtopic.php?pid=358746#p358746




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: sound and music looping

2018-04-08 Thread AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector


  


Re: sound and music looping

Since you say it only happens on longer sounds, my guess is that the developer is reloading the data into memory every time they want to loop the clip, instead of using the memory already allocated.

URL: http://forum.audiogames.net/viewtopic.php?pid=358727#p358727




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


sound and music looping

2018-04-07 Thread AudioGames . net Forum — Developers room : Jaseoffire via Audiogames-reflector


  


sound and music looping

So, this has happened multiple times now. It first happened with Inform and I figured it an odity of the program, but now it has also happened with libaudioverse. What ever is being used for the looping algorithm has an issue that causes a pause in the loop before it starts over again. In libaudioverse, this pause has only really occured on longer sounds like music. What could be causing this, and does anyone have a good solution?

URL: http://forum.audiogames.net/viewtopic.php?pid=358718#p358718




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector