Jump to content
Sign in to follow this  
Bea

Set volume?

Recommended Posts

Bea

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

 

Share this post


Link to post
Share on other sites
FrancescoDiMuro

Hi @Bea:)
Take a look at this: 


Let us know :)

Best Regards.


Click here to see my signature:

Spoiler

I will always thank you for the time you spent for me.
I'm here to ask, and from your response, I'd like to learn.
By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

Share this post


Link to post
Share on other sites
Bea
20 minutes ago, FrancescoDiMuro said:

Hi @Bea:)
Take a look at this: 


Let us know :)

Best Regards.

but how can i play the wav sound in diffrent volum tipes like 50 %

 

SoundSetWaveVolume(50)
SoundPlay("Kalimba.wav", 1)

that dosent work :S

Share this post


Link to post
Share on other sites
FrancescoDiMuro

@Bea

The function SoundSetWaveVolume sets ONLY the volume of that file.

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


Click here to see my signature:

Spoiler

I will always thank you for the time you spent for me.
I'm here to ask, and from your response, I'd like to learn.
By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

Share this post


Link to post
Share on other sites
Bea

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 :)

Share this post


Link to post
Share on other sites
Bea
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

Share this post


Link to post
Share on other sites
FrancescoDiMuro

@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

I will always thank you for the time you spent for me.
I'm here to ask, and from your response, I'd like to learn.
By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

Share this post


Link to post
Share on other sites
Bea
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 :)

Share this post


Link to post
Share on other sites
FrancescoDiMuro
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

I will always thank you for the time you spent for me.
I'm here to ask, and from your response, I'd like to learn.
By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

Share this post


Link to post
Share on other sites
Bea
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

Share this post


Link to post
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
Sign in to follow this  

×