What about music files on RAM?

Discussion and feedback on Construct 2

Post » Tue Sep 11, 2012 5:13 am

I did understand recently how images go to memory thanks to http://www.scirra.com/forum/vram-pow-2-textures_topic41053_page1.html, now my question is, what about music and sound efects?

How much memory do music files uses?
B
29
S
6
G
5
Posts: 148
Reputation: 5,084

Post » Tue Sep 11, 2012 6:32 am

Images are saved to spritesheets to save VRAM in C2:
http://www.scirra.com/blog/87/under-the-hood-spritesheets-in-construct-2

Music and sounds likely take the same amount of space as their file sizes. There is no need to fully decompress an audio file in memory. Only the bits of the sound that will be played soon are decompressed and sent to the sound card to be played.
B
79
S
24
G
54
Posts: 4,755
Reputation: 40,773

Post » Tue Sep 11, 2012 11:06 am

Your link about VRAM is very old (2010) and is pretty much out of date actually. Almost all desktop computers support non-power-of-two textures now so the limitations don't apply, at least in Construct 2's renderer. Even mobile devices support non-power-of-two textures except for tiled images, and in future they will support it for tiled textures too, making the "power of two" thing completely and thing of the past.

Music is streamed so should occupy very little RAM. Sound effect files generally sit in memory so will use as much RAM as their filesize. Generally audio is not a concern since images usually take up far more memory.Ashley2012-09-11 11:07:23
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Tue Sep 11, 2012 3:28 pm

Thank you guys.
Pretty clear about sound files.

@Ashley I know that the support for non-power-of-two exists. The thing is to optimize RAM in power-of-two images, am I wrong? This is a big concern for my project because part of the gameplay is based on different backgrounds. Every level has its own background and it has to be that way due to gameplay.
B
29
S
6
G
5
Posts: 148
Reputation: 5,084

Post » Tue Sep 11, 2012 3:37 pm

@GamerGon - I think you're a little confused - images aren't really needed in RAM because they're rendered by the GPU so have to be in VRAM instead.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Tue Sep 11, 2012 4:30 pm

@Ashley but my target is IPAD 2, and it has 512 mb shared memory.
B
29
S
6
G
5
Posts: 148
Reputation: 5,084


Return to Construct 2 General

Who is online

Users browsing this forum: Vallar and 9 guests