cppman Posted July 15, 2006 Share Posted July 15, 2006 (edited) Media FrameworkHi. This is my first version of the Media Framework, I plan to add more features, but now it is pretty basic.Some functions include:Play($sFile);$sFile is a string to the mp3/file Stop($sSong);stops playing the specified song Pause($sSong);pauses the specified song Resume($sSong);resume the specified song GetAlbumArt($sFile);file to download album art for SetVolume($sSong, $nnVolume);sets the volume of the specified song, $nnVolume is an integer between 0.0 and 1.0 SetPan($sSong, $nnPan);sets the pan for the specified song. -1.0 to 1.0 SetPitch($sSong, $nnPitch);sets the pitch for the specified song. .5 is twice slow the speed, 0 is original speed, 1 is twice as fast. GetLength($sSong);returns the length of the song in samples IsSeekable($sSong);returns true if the song is seekable IsPlaying($sSong);returns if $sSong is playing SetRepeating($sSong);boolean > set wether the song should repeat or not when done playing. IsRepeating($sSong);returns true if the specified song has the repeating propertie set to true. GetChannelCount($sSong);returns the number of channels in the song GetSampleRate($sSong);gets the sample rate of the specified song.You can play mutiple songs simutaniously, and each song has its own individual properties such as, volume, pan, pitch and so on. Nothing is global, if you wish to change the volume you must specifically change the songs volume.e.g.$song = Play("mysong.mp3") $song2 = play("myothersong.mp3") SetVolume($song, .5) SetVolume($song2, 1)This uses Matt Campbells COM Audio. Includes 2 dlls that must be copied to the systen directory and then COMAudio.dll needs to be registered. You can use the automatic tool in the .zip file, or do it manually. Instructions in the README.txt.Hope this helps anyone that is making a media player, game, or anything else. *Credits: CHRIS95219 and i used Lazycat's MP3TagInfo UDF.BIG NOTE! if you used "MyWay Media Player" and you got an Object error. This might not work for you. in the sample.au3 - the line where it says, "Play("song.mp3")" it should be changed to "Play("song.wav")" or whatever song you want to use to test it...Download Here: Edited July 15, 2006 by CHRIS95219 Miva OS Project Link to comment Share on other sites More sharing options...
Kip Posted April 30, 2007 Share Posted April 30, 2007 Very, very, VERY GOOD JOB! thnx! MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
Kip Posted May 2, 2007 Share Posted May 2, 2007 But your script gives errors MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
BrettF Posted May 2, 2007 Share Posted May 2, 2007 (edited) But your script gives errors Try Changing the line in MediaFramework.au3 Global $nVolume, $nPan, $nPitch, $nLength, $nChannelCount, $nSampleRate, $sCurSong, $objService, $objDeviceoÝ÷ ÚÚºÚ"µÍÛØ[ ÌÍÛÛ[YK ÌÍÛ[ ÌÍÛ]Ú ÌÍÛ[Ý ÌÍÛÚ[[ÛÝ[ ÌÍÛØ[T]K ÌÍÜÐÝÛÛË ÌÍÛØÙXÙK ÌÍÛØ]XÙK ÌÍÜ What other errors are you getting? EDIT: ALSO READ THE README!!!! In order to use the ActiveX/COM object used by this media framework both of these files must be moved to the Windows System Directory. audiere.dll -> C:\windows\system32 COMAudio.dll -> C:\windows\system32 after you move those files, now click start->run-> and type in: regsvr32 c:\windows\system32\COMAudio.dll Edited May 2, 2007 by Bert Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Kip Posted May 2, 2007 Share Posted May 2, 2007 (edited) Yes, I already copied those files to the system directory. I also registered COMAudio.dll. But I dont need this script anymore Errors: A lot! Edited May 2, 2007 by kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
BrettF Posted May 2, 2007 Share Posted May 2, 2007 (edited) Run this from the script dir to install it FileCopy (@ScriptDir & "\COMAudio.dll", @SystemDir) FileCopy (@ScriptDir & "\audiere.dll", @SystemDir) ShellExecute ("regsvr32", "c:\windows\system32\COMAudio.dll") Simple really EDIT: Yes... Yes it does error allot. Mostly object errors?? Edited May 2, 2007 by Bert Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now