Author Topic: Playing a .ogg sound file using GameConnection.play2D?  (Read 999 times)

I have (non-looping) music that I want to play using Play2D when a specific event occurs. The problem is, I've already had to do some fiddling with the sounds to make sure all of them are under the one-megabyte limit (I think. Correct me if I'm wrong), so I don't want to have to convert them back to .wav unless absolutely necessary.

Is there any way to play a .ogg file without having it be looped?

I'm not sure there is a one megabyte limit. I'd have to double check, but I think that's just to save on download times. I may be wrong, but I think I have some of my own music that's larger than a meg.

However, I think you can set "isLooping = 0;" in the datablock.

I'm fairly certain the looping is determined by the audio profile in use. I'm not sure of the names, but they're something along the lines of AudioClosestLooping3D, as opposed to AudioClosest3D. I don't really know if the engine actually cares how .ogg and .wav files are used, or if it's just a modding standard.

The 1MB limit is only for music loaded through the game's music loader which sets up music for you just by reading the music folder.

The 1MB limit is only for music loaded through the game's music loader which sets up music for you just by reading the music folder.
Oh yeah, I knew I was forgetting something. It was this.

I'm curious; did any of these suggestions work?