DirtDBaK Posted October 1, 2007 Share Posted October 1, 2007 Very Nice thanks for this addition! [center][/center] Link to comment Share on other sites More sharing options...
Bert Posted October 1, 2007 Author Share Posted October 1, 2007 (edited) Haha, it works with wmv files! Check this out: #include <Sound.au3> $file = 'C:\WINDOWS\system32\oobe\images\intro.wmv' ;open sound file $sound = _SoundOpen($file) If @error = 2 Then MsgBox(0, "Error", "The file does not exist") Exit ElseIf @error = 3 Then MsgBox(0, "Error", "The alias was invalid") Exit EndIf _SoundPlay($sound) Sleep(_SoundLength($sound, 2)) _SoundClose($sound) It also played an mpg, but _SoundLength didn't return the right time. It told me that a 2 minute video was 4 seconds. I also tried .avi, and it wouldn't play at all, the window that appears is just glitched out (visually), and the _SoundLength for that was way off as well. But wmv seems to work fine! did you test with audio.au3? I simply added to sound.au3, so you should have the same result. If you don't, let me know, so I can test to see what I need to do to tweak it. Edited October 1, 2007 by Volly The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Bert Posted October 9, 2007 Author Share Posted October 9, 2007 Currently Audio does not support Vista. I do not have a Vista PC, so I have no way of addressing the issue. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
DavidRogers Posted October 10, 2007 Share Posted October 10, 2007 I've been using Audio.au3 under XP and have found it to work wonderfully, thank you to all who have contributed!! However, I've been trying to set the Microphone RECORD level. The extract of code below seems to set the microphone PLAYBACK slider and not the RECORD slider. Am I being thick?? Which function call modifes the microphone input level?? David ;=============================================================================== ; ; Function Name: _SoundSetMicrophoneVolume ; Description:: Sets the Microphone input volume ; Parameter(s): $iVolume - % to set ; Requirement(s): AutoIt 3.2 ++ ; Return Value(s): 1 - Success, 0 and @error = 1 - Failure ; Author(s): Volly ; Example: _SoundSetMicrophoneVolume(50) ; ;=============================================================================== ; func _SoundSetMicrophoneVolume($iVolume) _SetMixerVolume($MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE, $iVolume) If @error Then Exit else SetExtended(1) Return(@extended) endif EndFunc Link to comment Share on other sites More sharing options...
Bert Posted October 10, 2007 Author Share Posted October 10, 2007 I'll see about doing some research on MSDN to see what needs to be coded to make it work. I suspect the "SRC_MICROPHONE," needs to be tweaked, but I won't know for sure until I research it. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
DavidRogers Posted October 26, 2007 Share Posted October 26, 2007 Hi Volly, I notic that the banner regarding Vista has been removed and that the audio.au3 date/time stamp has changed, have you found a solutuion to making audio.au3 control the master device volume slider for Vista? Best regards, David Link to comment Share on other sites More sharing options...
Bert Posted November 7, 2007 Author Share Posted November 7, 2007 I'm still working on the solution. If someone wishes to assist.... The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Nahuel Posted November 8, 2007 Share Posted November 8, 2007 Yo Volly, you know I've been looking all over for a way of generating a sound... I've found lots of information for how to acomplish this using some functions in winmm.dll, but my lack of knowledge didn't even let me get started. Do you think it's possible?I found someone who did it in VB:http://forums.devx.com/archive/index.php/t-75011.html Link to comment Share on other sites More sharing options...
Bert Posted November 28, 2007 Author Share Posted November 28, 2007 You can use the command "beep" to do what you want to do. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
GEOSoft Posted November 28, 2007 Share Posted November 28, 2007 (edited) I'm still working on the solution. If someone wishes to assist.... I sent you a PM with some info but here is more.Starting from Windows Vista, Microsoft changed the way that applications control the sound volume. When an application running in Vista changes the sound volume, it doesn't affect the master volume of the entire system anymore. Instead, it only affects the volume for the running application. Unfortunately, this new "feature" creates huge compatibility problems to all applications and utilities that change the sound volume of the entire system.Microsoft also released a new set of programming interfaces for controling the master volume in Vista.These quotes were taken from information regarding VolMouse by Nir Sofer. Apparently he now has a version that will work with Vista so it can be done.Edit: Also check thisMSDN Edited November 28, 2007 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
DirtDBaK Posted November 28, 2007 Share Posted November 28, 2007 (edited) You should add thisFunc _SoundGetWaveVolume() Local $WaveVol = -1, $p, $ret Const $MMSYSERR_NOERROR = 0 $p = DllStructCreate("dword") If @error Then SetError(2) Return -2 EndIf $ret = DllCall("winmm.dll", "long", "waveOutGetVolume", "long", -1, "long", DllStructGetPtr($p)) If($ret[0] == $MMSYSERR_NOERROR) Then $WaveVol = Round(Dec(StringRight(Hex(DllStructGetData($p, 1), 8), 4)) / 0xFFFF * 100) Else SetError(1) EndIf $Struct = 0 Return $WaveVol EndFunc ;==>_SoundGetWaveVolumeI didnt wirte that but GaryFrost did! Edited February 12, 2008 by DBak [center][/center] Link to comment Share on other sites More sharing options...
Nahuel Posted November 29, 2007 Share Posted November 29, 2007 You can use the command "beep" to do what you want to do.Beep? No, haha, I meant using the sound card. Link to comment Share on other sites More sharing options...
Bert Posted November 29, 2007 Author Share Posted November 29, 2007 I thought beep did this....my bad The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Iuli Posted January 29, 2008 Share Posted January 29, 2008 Weird, none of these UDFs work for me ! Dunno why, but they worked on a fried PC. Anything that can be done ? [size="2"]SFXMaker[/size] - The most complete switchless installer creator software[indent][/indent] Link to comment Share on other sites More sharing options...
masvil Posted January 29, 2008 Share Posted January 29, 2008 @Volly: your UDF works great, I testes almost all functions on XP. Anyway: - what about Vista compatibility? - have you planned to add microphone registration volume setting? Link to comment Share on other sites More sharing options...
Bert Posted February 11, 2008 Author Share Posted February 11, 2008 (edited) I do not use Vista, so I do not plan to offer a fix for it. Edited February 11, 2008 by Volly The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
GaryFrost Posted February 12, 2008 Share Posted February 12, 2008 You should add this Func _SoundGetWaveVolume() Local $WaveVol = -1, $p, $ret Const $MMSYSERR_NOERROR = 0 $p = DllStructCreate("dword") If @error Then SetError(2) Return -2 EndIf $ret = DllCall("winmm.dll", "long", "waveOutGetVolume", "long", -1, "long", DllStructGetPtr($p)) If($ret[0] == $MMSYSERR_NOERROR) Then $WaveVol = Round(Dec(StringRight(Hex(DllStructGetData($p, 1), 8), 4)) / 0xFFFF * 100) Else SetError(1) EndIf $Struct = 0 Return $WaveVol EndFunc ;==>_SoundGetWaveVolume I didnt wirte that and i wish i knew who did i'd thank them! http://www.autoitscript.com/forum/index.ph...ost&p=82967 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
DirtDBaK Posted February 12, 2008 Share Posted February 12, 2008 Sorry I should have included a link =P [center][/center] Link to comment Share on other sites More sharing options...
GEOSoft Posted February 12, 2008 Share Posted February 12, 2008 Sorry I should have included a link =PYou still appear to have missed who the author was. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
DirtDBaK Posted February 12, 2008 Share Posted February 12, 2008 fixed that... [center][/center] 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