dragan Posted September 17, 2011 Posted September 17, 2011 I'm always getting ret. val for this function larger than 0: Local $lpszReturnString $mciLevel = DllCall('winmm.dll', 'long', 'mciSendStringA', 'str', 'status mywave level', 'str', $lpszReturnString, 'long', 64, 'long', 0) ;now my $mciLevel[0] = 328, and $mciLevel[2] is blank and I cannot get any values, why is that? P.S. I'm using windows 7 x64 P.S.S. full script is this: Local $Form = GUICreate('Sound level', 220, 50) Local $Label1 = GUICtrlCreateLabel('000', 10, 10, 30) GUISetState(@SW_SHOW, $Form) Local $lpszReturnString Local $mciInit = DllCall('winmm.dll', 'long', 'mciSendStringA', 'str', 'open new type waveaudio alias mywave', 'str', $lpszReturnString, 'long', 64, 'long', 0) If $mciInit[0] <> 0 Then Exit Do $mciLevel = DllCall('winmm.dll', 'long', 'mciSendStringA', 'str', 'status mywave level', 'str', $lpszReturnString, 'long', 64, 'long', 0) If $mciLevel[0] <> 0 Then MsgBox(0, 'Error', 'Script will now close') Exit EndIf GUICtrlSetData($Label1, $mciLevel[2]) Until GUIGetMsg() = -3 GUIDelete($Form) Exit
Beege Posted September 17, 2011 Posted September 17, 2011 Do you have to use that code? Theres a Bass UDF for sound and music functions that will make what your trying to do pretty easy Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator
dragan Posted September 17, 2011 Author Posted September 17, 2011 I have seen the bass udf, but with bass library I can monitor only channels that's been playing with bass.dll file, and I cannot monitor system's equalizer level. (Or I missed something with the bass UDF , plz correct me if I'm wrong with the statement above.)
Beege Posted September 17, 2011 Posted September 17, 2011 I have seen the bass udf, but with bass library I can monitor only channels that's been playing with bass.dll file, and I cannot monitor system's equalizer level. (Or I missed something with the bass UDF , plz correct me if I'm wrong with the statement above.) Im not sure but your probably right about the only bass channels. I ran your script and from what I can tell everything was working fine. $mcilevel[2] did not come back blank for me. The number was bouncing right along with the music playing so I think Im missing something? Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator
dragan Posted September 17, 2011 Author Posted September 17, 2011 What is your OS? 'Cause I think it might be something wrong with the OS architecture and that function, that's why I mention that my OS is Win7 64-bit. I can't even get to $mcilevel[2] value, my script get stopped at part: If $mciLevel[0] <> 0 Then MsgBox(0, 'Error', 'Script will now close') Exit EndIf and for this function to work properly this value must be 0, if I remove this check I just get $mcilevel[2] as blank/null value. P.S. I also tried running upper function with command: #AutoIt3Wrapper_UseX64=n
Beege Posted September 17, 2011 Posted September 17, 2011 (edited) Im running win7 64 also. Very weird... It should be returning an error if it dosent return 0. Have you tried getting it? From MSDN: "Returns zero if successful or an error otherwise. The low-order word of the returned DWORD value contains the error return value. If the error is device-specific, the high-order word of the return value is the driver identifier; otherwise, the high-order word is zero. For a list of possible error values, see MCIERR Return Values." Edited September 17, 2011 by Beege Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator
dragan Posted September 17, 2011 Author Posted September 17, 2011 That's odd, I've used error check and I got this message: MCI Error Number 328:No wave device is installed that can record files in the current format. To install a wave device, go to Control Panel, click Printers and Other Hardware, and then click Add Hardw however I have installed driver for my integrated sound card (MSI P67-GD55 motherboard), and it's working properly, and I have nothing disabled in the device manager.
JohnOne Posted September 17, 2011 Posted September 17, 2011 Works fine for me win 7 32. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
dragan Posted September 17, 2011 Author Posted September 17, 2011 Solved... It seems that by default, mixer is disabled and hidden from Sound recording features for my drivers. So I had to go to Control Panel > Sound > Recording, turn on Show disabled devices and enable Stereo Mix. Tnx for help it's all working normally now.
Beege Posted September 17, 2011 Posted September 17, 2011 if you right click on the volume tray icon, and go to recording devices, do any appear? Also I never used 'mciSendStringA', but im looking at the command 'set' and it might be something you need to use?? http://msdn.microsoft.com/en-us/library/dd798661(v=vs.85).aspx Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator
Beege Posted September 17, 2011 Posted September 17, 2011 I need to refresh more. Glad you got it Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator
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