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 change the music volume on the trainer?
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Wed Oct 09, 2019 10:41 am    Post subject: Reply with quote

.lua wrote:
According to the assembly code above, I succeeded in playing MP3. Now I want to ask if you can set the playing position of MP3,
such as:
Code:
senkTo ()


Maybe from the main source of code; You can access @ mgr.inz.Player.
playing MP3 files with CE (extended playSound function)

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1667

PostPosted: Thu Oct 10, 2019 5:10 am    Post subject: Reply with quote

.lua wrote:
mgr.inz.Player wrote:
According to the assembly code above, I succeeded in playing MP3. Now I want to ask if you can set the playing position of MP3,
such as:
Code:
senkTo ()


By use mgr.inz.Player MCI send command module, you need to make some additional function to get :

1. Length of MP3 file (count in times)

example :

Code:
function lengthMP3()
 if not initializeMPlayer() then return end
 local a,b=MPlayerSendCommand('status MediaFile length')
 return tonumber(b) or 0
end

2. Duration of MP3

example :

Code:
function durationMP3()
 if not initializeMPlayer() then return end
 local a,b=MPlayerSendCommand('status MediaFile length')
 return tonumber(b) or 0
end


and then make a function to 'seek' the position of MP3 as you want.

example :

Code:
function seekMP3()
 if not initializeMPlayer() then return end
 local a,b=MPlayerSendCommand('Seek')
-- in VB Net I use this :
--
-- Public Sub mmSeek(ByVal sngPosition As Single)
-- '   Seek a specific position within the file
-- Dim lngReturn As Long   '   Hold the value returned by the mciSendString function
-- lngReturn = mciSendString("Seek " & strAlias & " to " & sngPosition, "", 0, 0)
-- End Sub

// so can make it in Lua
end


For reference, please googling about 'mciSendString'

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
.lua
Expert Cheater
Reputation: 1

Joined: 13 Sep 2018
Posts: 189

PostPosted: Thu Oct 10, 2019 6:03 am    Post subject: Reply with quote

Corroder wrote:

Code:
function seekMP3()
 if not initializeMPlayer() then return end
 local a,b=MPlayerSendCommand('Seek')
-- in VB Net I use this :
--
-- Public Sub mmSeek(ByVal sngPosition As Single)
-- '   Seek a specific position within the file
-- Dim lngReturn As Long   '   Hold the value returned by the mciSendString function
-- lngReturn = mciSendString("Seek " & strAlias & " to " & sngPosition, "", 0, 0)
-- End Sub

// so can make it in Lua
end


For reference, please googling about 'mciSendString'
I just want to try to adjust the position of the playback schedule in a similar way to the volume adjustment function.
Code:
function seekMP3(pol)  if not initializeMP3Player() then return end  MP3PlayerSendCommand('seek MediaFile to '..pol)  end
Back to top
View user's profile Send private message
MysteriousPowers
How do I cheat?
Reputation: 0

Joined: 08 Dec 2022
Posts: 1

PostPosted: Thu Dec 08, 2022 8:41 pm    Post subject: mgr.inz.Player (MP3 PLAYER) Reply with quote

can i not use this while attached to a game? the mp3 player. i have set it up and when i attached to a game and tried playing a sound. it crashed my trainer.
need help on this please.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
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