Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Add wave/mp3 to application

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Add wave/mp3 to application
#3313
Posted by: KaReL 2004-02-05 04:57:09
Is it possible to add mp3 / wave into an application? (I prefer mp3 because of the size-issues)


I mean INSIDE the application? Inside the executable?


I read something about xrc ... Could it be done via there?


Thanks!

------------------------
Website: www.KaReLs0ft.be
Message2. Re: Add wave/mp3 to application
#3316
Posted by: upCASE 2004-02-05 20:44:14
Hi!
I don't think XRC would be suitable for that purpose (not sure, but I think that it only handles dynamic setup of widgets, not custom files).
Maybe embedding the mp3 or wav in the rc script and linking it as a resource could help. This would imply that you'll have to abandon cross platform compatiblity, because linux doesn't know about things like rc scripts.
Check this out for RCDATA http://www.jorgon.freeserve.co.uk/Resource.htm#raw
You will have to use win32 api functions to extract ("load") the resource though... Another possible way would be to do it like handling xpm files: Include the binary data as an array of chars and pass it to the sound processing function.

upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: Add wave/mp3 to application
#3317
Posted by: KaReL 2004-02-06 02:35:37
hihi :) like 2M of raw data as chars? :p an icon of like 100 bytes become already 1K in chars ;)

------------------------
Website: www.KaReLs0ft.be
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥860.00 ·
 
 
¥410.00 ·
 
 
¥288.00 ·
 
 
¥918.00 ·
 
 
¥288.00 ·
 
 
¥264.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0