|
|
Hi everyone. I have a program that plays audio files. I have a control that I want to use to control the volume. I have declared a HANDLE for the waveOut as
HWAVEOUT hWo;
that I use to write the audio samples. Now I want to control the volume. I used
waveOutSetVolume() and this affects the wave output volume of the system. How do I control the volume from my application without affecting the volume of the system, or what function is used for this task. Thanks in advance.
|
|
|
|
|
Dan_K wrote: How do I control the volume from my application without affecting the volume of the system...
I believe you'll need Vista for per-application volume control.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
As David mentioned you might be looking for an OS specific type function. You might try the following, though and that is to obtain the current volume setting when your program starts up, then allow the user to change volume at will, and when the user closes your program you restore the volume back. It won't work quite like you are looking for, but it might be a nice addition.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
Windows Media Player 9 on Windows XP for instance works without changing the system volume so I thought there could be a way out.
|
|
|
|
|
There are two ways to change the intensity of your output:
- Change the volume: on Xp and earlier systems you have only a general setting for it, starting on Vista has been provided a per-application setting
- Scaling the audio samples: in this case you have to get the audio data from your stream, modify them and send the modified one to the audio output
|
|
|
|
|
Can you please give me a brief idea about scaling the samples? I don't know much about digital sound processing but I learnt it has to do with the amplitude. I don't know if the amplitude is the value of a sample. If this is right, then I think if you give me a brief idea, I would be able to do it.
|
|
|
|
|
Windows Media Player -as far as i know- user DirectX/DirectShow to play sounds, not the waveOut API (i am not sure how it works with DirectShow, am just mentioning...)
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <
|
|
|
|
|
Hi all,
I have made a multiline edit control but the problem is when i try to use tab in it the focus shifts to next control. Is there any way to use tab inside edit control.
Thanks in advance
|
|
|
|
|
|
Hi I want to know how Print Preview from applications (like MS-Paint,
Windows Photo Gallery etc.,) works?
Will the properties of the preview (like qulaity, size, orientation etc.,)
depends on the printer driver or the application?
Can anybody share some writeup on this?
Regards
msr
|
|
|
|
|
This[^] should get you started.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Hi,
Sorry for asking a powershell question. This should be easy for an expert.
Suppose I'm in the folder C:\Windows\System32 . I want to print out only "System32".
I have found commands that give the entire path, but I want only the last bit
Thanks,
Mel
|
|
|
|
|
You have posted the same question on 4 different forums; please, don't do it!
The best when asking something is to choose the forum that better matches your subject, and post a unique question explaining as better as possible what is your problem.
Thank you!
|
|
|
|
|
How to convert PDF to image file?
example:jpg file
Thank you
i want to use C language to do.
where is the conference code.
|
|
|
|
|
You probably need a library for the purpose (the other route would be reading the PDF specifications for implementing the decoding algorithm).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi all
How can i use FilterIndex in CFileDialog?
Please help me
|
|
|
|
|
MsmVc wrote: How can i use FilterIndex in CFileDialog?
As specified by the documentation. MSDN gives even this sample code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi, I have a combo box in my application.
Whenever there is CB_SELCHANGE occurs, I need to perform some operation.
If the operation fails I need to reset the combo box to previous value.
My Trail:
Whenever there is a change in selection I am copying that item to a string variable (say str).
Now I am using CB_FINDSTRING to get the index using str by calling SendMessage. But it was not working.
I have confusion with LPARAM and WPARAM in SendMessage. Please give me the syntax of SendMessage
using CB_FINDSTRING.
Can you people throw me some idea?
Thanks in advance
msr
modified on Wednesday, October 27, 2010 1:43 AM
|
|
|
|
|
A bit of book-keeping would avoid the SendMessage stuff.
Anyway you probably have to write something like (assuming your str is a char* ):
LRESULT result = SendMessage(hWnd, CB_FINDSTRING, (WPARAM)-1, (LPARAM)str);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thank you. Now it is working. I have interchanged LPARAM and WPARAM parameters. Here is my code.
DWORD GetComboBoxIndex = 0;
GetComboBoxIndex = SendMessage(hWnd, CB_FINDSTRINGEXACT, -1, (LPARAM)str);
SendMessage(hWnd, CB_SETCURSEL, GetComboBoxIndex, NULL);
Regards
msr
|
|
|
|
|
You are welcome.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I have the code about create many modeless dialog .
for(int i=0;i < 5;++i)
{
pRegionDlg[i] = new CRegionDlg ( this );
pRegionDlg[i]->Create( IDD_DIALOG , this );
pRegionDlg[i]->ShowWindow( SW_SHOW ) ;
}
this code is error heap . but I don't understand why it's error . while this code can run good on other program .
Thanks for reading and helping .
|
|
|
|
|
HTT90 wrote: this code is error heap . but I don't understand why it's error . while this code can run good on other program .
What is this supposed to mean? What error? Where? How was pRegionDlg declared? Please clarify.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Maybe 'the other program' properly allocates the pRegionDlg array.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|