Can OGG files be stored as a "resource"?

For questions about using Classic.

Post » Fri Jan 30, 2009 11:16 pm

This thread viewtopic.php?p=19984#p19984 by thomasmahler made me wonder.

Can OGG files be stored as a binary resource?

And the answer appears to be "no", which is a pity. Is this really so?
B
2
S
2
G
3
Posts: 158
Reputation: 1,566

Post » Sat Jan 31, 2009 12:25 am

Did you try it? You can play resources with the XAudio2 object as well as files.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sat Jan 31, 2009 1:40 am

Yes, I did try it. I told XAudio to play from a resource, but nothing happened.
B
2
S
2
G
3
Posts: 158
Reputation: 1,566

Post » Sat Jan 31, 2009 1:44 am

'Play music from resource'?

That works fine for me :).
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sat Jan 31, 2009 11:02 am

Are you using OGG files, though?
B
2
S
2
G
3
Posts: 158
Reputation: 1,566

Post » Sat Jan 31, 2009 12:55 pm

Without installing extra codecs, you can't use 'Play Music' to play OGGs, only the channel actions can load OGGs. See XAudio2 supported file formats.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sat Jan 31, 2009 1:08 pm

Yes, I'm aware of that.

However, XAudio can load an OGG file and play it on a channel, which is what I did with another test to get around the "cannot play OGGs as music without the codec" issue (which, on a side note, is why I was suggesting using something like SDL_mixer - it seems weird you can play OGGs as sound effects but not as music!). That was stored as an external file - it spawned viewtopic.php?f=3&t=2607 this topic as a result. It is trying to do the same thing but with the OGG file as a binary resource that's failing.
B
2
S
2
G
3
Posts: 158
Reputation: 1,566


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests