poisonkiller Posted November 11, 2005 Share Posted November 11, 2005 I meaned .wmAAAA Link to comment Share on other sites More sharing options...
mrjlturner Posted December 7, 2005 Share Posted December 7, 2005 I'm having a hard time figuring out this repeat below. Can you give a sample of how to repeat a .mp3 file? Thanks! ;=============================================================================== ; ; Function Name: _MediaPlay() ; Description: Plays a opened media file. ; Parameter(s): $i_MediaId - Media ID returned by _MediaOpen()/MediaCreate() ; [optional] $i_From - Sets time in seconds where to begin playing ; [optional] $i_To - Sets time in seconds where to bstop playing ; [optional] $i_Speed - Sets the speed to play with ; [optional] $f_Fast - When 1 it will play faster then normal ; [optional] $f_Slow - When 1 it will play slower then normal ; [optional] $f_Fullscreen - When 1 movies will play fullscreen ; [optional] $f_Repeat - When 1 it will keep repeating ; [optional] $f_Reverse - When 1 the movie will been played reversed ; [optional] $f_Scan - When 1 plays as fast as possible ; The default value of all the optional parameters is 0. ; Some file formats dont understand some of the optional functions ; Experimate with it. ; Requirement(s): AutoIt ; Return Value(s): On Success - Returns 1 ; On Failure - Returns 0 and sets @ERROR = 1 ; Author(s): svennie ; ;=============================================================================== Link to comment Share on other sites More sharing options...
svennie Posted December 10, 2005 Author Share Posted December 10, 2005 Here you go: $Handle=_MediaOpen("file.mp3") _MediaPlay($Handle,0,0,0,0,0,0,1) Sorry for my English, I'm Dutch... =DMedia UDFINet Adv UDF Link to comment Share on other sites More sharing options...
YoseMite Posted December 10, 2005 Share Posted December 10, 2005 Thanks for this script! It's very useful for me.. But is it also possible to record sound? Like record sound from a streaming webradio, ...?" Link to comment Share on other sites More sharing options...
erifash Posted December 11, 2005 Share Posted December 11, 2005 Very nicely done. I have one question though; how would you reverse a video file (or clip)? Not just play in reverse, but actually be in reverse? Thanks! My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
peter1234 Posted December 11, 2005 Share Posted December 11, 2005 @svennie: Thanks for posting the Media UDF scripts. There seems to be a problem with the DLL call in the Func _MediaSave. When I run the sample record script you supplied, everything seems to work except that no file is saved. I added a message box to Func _MediaSave and confirmed that file name was being sent correctly to it, but the DLL does not seem to save the file. I have version 5.1.2600.1106 of winmm.dll. I am using Media UDF 1.2. I think it would be good to put the version number in the Media UDF script. Link to comment Share on other sites More sharing options...
Tukata Posted February 17, 2006 Share Posted February 17, 2006 svennie, I am trying to understand your UDF (which seems very useful) but I have difficulties. Is there any detailed documentation ? What I am looking now is how to record a file (or part of a file) which is embedded in and played by another application. I will much appreciate your advice, Thank you Tuk Link to comment Share on other sites More sharing options...
ConsultingJoe Posted February 17, 2006 Share Posted February 17, 2006 I love your udf but i am also having so trouble, the play for example i dont understand how the parameters work. how would you play in fullscreen. The record does not seem to save the file at all. And is there any way to compare one file to another, wav to wav, vocals anything, that would help so much. it might start a voice recognition... Thanks again zero Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
YoseMite Posted March 3, 2006 Share Posted March 3, 2006 Thanks for your UDF, I realy like that! But I've a question about it... Is it also possible to "Mix" the mp3's? So if you play song1, that he mix the sound with song2? I hope that is possible... Link to comment Share on other sites More sharing options...
Lakes Posted March 25, 2006 Share Posted March 25, 2006 Ok, I`ve put this <Media.au3> into C:\Program Files\AutoIt3\beta\Include Tried the record example (made a test folder to save the test.wav file to) and the example does everything as it should (no errors). But when I look in the folder its empty. This would be brilliant if I could get it to work... Thanks! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Lakes Posted March 25, 2006 Share Posted March 25, 2006 Ok, I`ve put this <Media.au3> into C:\Program Files\AutoIt3\beta\Include Tried the record example (made a test folder to save the test.wav file to) and the example does everything as it should (no errors). But when I look in the folder its empty. This would be brilliant if I could get it to work... My (Experimental) Code... expandcollapse popup#include <Media.au3> #include <GUIConstants.au3> ; == GUI generated with Koda ==); $recorder = GUICreate("Recorder", 336, 174, 192, 129) $Start = GUICtrlCreateButton("Start", 16, 112, 113, 49, 0) GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif") $Stop = GUICtrlCreateButton("Stop", 200, 112, 113, 49, 0) GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif") ;$Progress1 = GUICtrlCreateProgress(153, 16, 23, 145) ;GUICtrlSetColor(-1, 0x0A246A) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select case $msg = $Start $Media=_MediaCreate(6) MsgBox(64,"Media UDF by Svennie (sound record example)","Media ID is: " &$Media) If @error Then _Error() Exit EndIf _MediaRecord($Media) If @error Then _Error() Exit EndIf Case $msg = $Stop _MediaStop($Media) $File=FileSaveDialog("","","Wave files (*.wav)")&".wav" _MediaSave($Media,$File) If @error Then _Error() Exit EndIf _MediaClose($Media) If @error Then _Error() Exit EndIf EndSelect Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;;;;;; EndSelect WEnd Func _Error() If @error Then Beep(500) _MediaClose($Media) Exit EndIF EndFunc Someone else was having the same (record) problem. The Include file is in the right place, because it plays a wav file no problem. Should this post be in the Support Forum?? Thanks! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
ConsultingJoe Posted March 25, 2006 Share Posted March 25, 2006 yeah, it did't work for me either. whats up with that Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
Emperor Posted March 25, 2006 Share Posted March 25, 2006 I just changed the MediaSave function to get it working for me. Func _MediaSave($i_MediaId,$s_Location) DllCall("winmm.dll","int","mciSendString","str","save media"&$i_MediaId&" " & '"'&FileGetShortName($s_Location)&'"',"str","","int",65534,"hwnd",0) If @error Then SetError(1) Return 0 Else Return 1 EndIf EndFunc That should work now. Link to comment Share on other sites More sharing options...
Tukata Posted April 25, 2006 Share Posted April 25, 2006 (edited) I could not use Media.au3 too. It wont save. So I made the change as suggested above by Emperor and it works. Now I want to ask how can I record a playing sound (palyed by another application) ? Thanks Tuk Edited April 25, 2006 by Tukata Link to comment Share on other sites More sharing options...
Emperor Posted April 25, 2006 Share Posted April 25, 2006 http://www.autoitscript.com/forum/index.ph...topic=24779&hl= Link to comment Share on other sites More sharing options...
ConsultingJoe Posted April 25, 2006 Share Posted April 25, 2006 I just changed the MediaSave function to get it working for me. Func _MediaSave($i_MediaId,$s_Location) DllCall("winmm.dll","int","mciSendString","str","save media"&$i_MediaId&" " & '"'&FileGetShortName($s_Location)&'"',"str","","int",65534,"hwnd",0) If @error Then SetError(1) Return 0 Else Return 1 EndIf EndFunc That should work now.WOW, thanks man, it works great, now I can use this Check out ConsultingJoe.com Link to comment Share on other sites More sharing options...
Tukata Posted April 28, 2006 Share Posted April 28, 2006 Can someone please make a demo how to use: _MediaCapture() ?? Thank you Tuk Link to comment Share on other sites More sharing options...
marfdaman Posted May 3, 2006 Share Posted May 3, 2006 Very well done! My only suggestion would be to add a way (parameter) to define the song that is to be played after the current one has ended / set a certain variable to 1 when it repeats a previously playes file, so you can tell when a file has reached it's end. Regards Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Link to comment Share on other sites More sharing options...
J_Y_C Posted August 9, 2006 Share Posted August 9, 2006 (edited) I would really like to get this UDF to work for me, as it would make me jump for joy. 1. I can't get any of the functions to work, tho. I have the Media.au3 in the include directory, and it's getting "included" ok, but I can't get it to work properly. For instance:#include <Media.au3> $vid = _MediaOpen("d:\temp\au\testing.avi") _MediaPlay($vid,0,120,0,0,0,0,0,0,0)So, according to this code, it should find the testing.avi file, open it, and then play it for 2 minutes. But, all it does is flash a little gui box on the screen and exits.2. I don't know if the Media.au3 is version 1.2 or not. It's not commented. I downloaded it from the author's sig at the start of this thread. Is that the most recent version, or is 1.2 somewhere else?TIA, Please advise.BUMP! Edited August 10, 2006 by J_Y_C Link to comment Share on other sites More sharing options...
i542 Posted August 10, 2006 Share Posted August 10, 2006 You must be awarded for this! It is for A+ (or 5+, it all depends from where are you)! i542 I can do signature me. 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