Jump to content

Set volume?


Recommended Posts

Hey i try to make a gui where i can set the volume to an exact % and than play the sound but i am not able to figger out how :S and the programm crashs every time i play the sound :(

 

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 219, 68, 470, 368)
$Volume = GUICtrlCreateInput("Volume", 16, 24, 73, 21)
$Button1 = GUICtrlCreateButton("Button1", 104, 24, 91, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

Case $Button1

SoundPlay("Kalimba.mp3", 1)

    EndSwitch
WEnd

 

Link to comment
Share on other sites

i would like to make an sort of help programm for people with tinnitus, to mask the tinitus so it should be easy for them to set it up i think, master volum is not good for that :(  because they need to change there sound habits it should only make the sound of the wav file quiter so they forget the program and dont need to change there habbits and hopefully help them with there tinnitus. 

it would be great if you could help me with that :)

Link to comment
Share on other sites

11 minutes ago, FrancescoDiMuro said:

@Bea

The function SoundSetWaveVolume sets ONLY the volume of that file.

Are you trying to change the Master volume of your PC? :)

i would like to make an sort of help programm for people with tinnitus, to mask the tinitus so it should be easy for them to set it up i think, master volum is not good for that :(  because they need to change there sound habits it should only make the sound of the wav file quiter so they forget the program and dont need to change there habbits and hopefully help them with there tinnitus. is it possible to set a sound levl and if ppl turn sound up the sound stay at the levl ? it should be save to use... dont want ppl to get ear damage by blowing there erars out

it would be great if you could help me with that :)

Edited by Bea
Link to comment
Share on other sites

@Bea
You are trying to do a good thing, and I'm trying to help you out :)
So, you are not trying to control the master volume, but only the volume of a sound file?
Are you going to run only one sound file, or more at the same time?
Explain me more, and I'll try to help you out as much as I can :)

Best Regards.

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

Just now, FrancescoDiMuro said:

@Bea
You are trying to do a good thing, and I'm trying to help you out :)
So, you are not trying to control the master volume, but only the volume of a sound file?
Are you going to run only one sound file, or more at the same time?
Explain me more, and I'll try to help you out as much as I can :)

Best Regards.

Thanks, i startet the project today and found good good stuff what i like to implament,

The main core is that ppl can set volum for there mask sound and than select diverent tipes of sounds, (white nois,brown, pink)

in the future i will implement autorun sound, and a trainer function to drain the vollume over time and mouch more

 

but the main core is "set volum for there mask sound and than select diverent tipes of sounds, (white nois,brown, pink) "

i also make a gui to make it easy for them :)

 

thanks for your help :)

Link to comment
Share on other sites

2 minutes ago, Bea said:

but the main core is "set volum for there mask sound and than select diverent tipes of sounds, (white nois,brown, pink) "

So, play one sound at the same time? :)
 

2 minutes ago, Bea said:

i also make a gui to make it easy for them :)

Feel free to show us :)

Best Regards.

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

1 minute ago, FrancescoDiMuro said:

So, play one sound at the same time? :)
 

Feel free to show us :)

Best Regards.

Yeah only one sound at the time

the Gui is pritty mouch shit it only shows what i men, but i can show you, when i get more stuff like trainer mod and whatelse i will make it bigger and offcourse i design it at the end to make it little bit less boring to watch :D

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 356, 52, 376, 218)
$Volume = GUICtrlCreateInput("Volume", 128, 16, 73, 21)
$Button1 = GUICtrlCreateButton("Start", 232, 16, 91, 25)
$WhiteNoise = GUICtrlCreateCombo("WhiteNoise", 8, 16, 97, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

yeah only to demonstrate what i planed

it would be great if you manage to put a specific mp3/wav file at specific volum

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...