Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


how to hardcode audio files and play them in a c++ or c# pro

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Thunder_Bird
Cheater
Reputation: 0

Joined: 27 Apr 2018
Posts: 33
Location: pakistan

PostPosted: Fri Nov 20, 2020 6:34 am    Post subject: how to hardcode audio files and play them in a c++ or c# pro Reply with quote

idk if the question makes sense but let me try to explain what I want. I dont want to play audio file(.wav file or anyother format) from disk but from with in the program itself. tell me if its possible.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Fri Nov 20, 2020 1:45 pm    Post subject: Reply with quote

The PlaySound API accepts a module handle and resource id to load from memory if you embed the sound (ie. a wav file) into the applications resources.

https://docs.microsoft.com/en-us/previous-versions/dd743680(v=vs.85)
https://docs.microsoft.com/en-us/windows/win32/multimedia/playing-wave-resources?redirectedfrom=MSDN

There are also thousands of other audio libraries that can load and play media from memory directly for various other file formats and such.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Sat Nov 21, 2020 9:27 pm    Post subject: Reply with quote

besides the resource, its possible to play raw binary audio from memory as long as the API accept that type of argument.

but keep in mind you will need to capture/decode the stream and place it in hex array, also check OpenAL library.

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
Thunder_Bird
Cheater
Reputation: 0

Joined: 27 Apr 2018
Posts: 33
Location: pakistan

PostPosted: Tue Nov 24, 2020 9:04 am    Post subject: Reply with quote

thanks guys.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites