Click here to Skip to main content
15,921,959 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CFTPFileFind Pin
Renjith Ramachandran8-Sep-02 23:47
Renjith Ramachandran8-Sep-02 23:47 
GeneralDDV and DDX in Dialog Bars Pin
Chun Te, Ewe8-Sep-02 6:37
Chun Te, Ewe8-Sep-02 6:37 
GeneralRe: DDV and DDX in Dialog Bars Pin
Joaquín M López Muñoz8-Sep-02 6:46
Joaquín M López Muñoz8-Sep-02 6:46 
GeneralRe: DDV and DDX in Dialog Bars Pin
Chun Te, Ewe8-Sep-02 7:02
Chun Te, Ewe8-Sep-02 7:02 
Questionmenus and button labels in arabic/urdu? Pin
Omar Lodhi8-Sep-02 5:11
Omar Lodhi8-Sep-02 5:11 
AnswerRe: menus and button labels in arabic/urdu? Pin
Imran Farooqui8-Sep-02 7:25
Imran Farooqui8-Sep-02 7:25 
AnswerRe: menus and button labels in arabic/urdu? Pin
adamUK8-Sep-02 12:05
adamUK8-Sep-02 12:05 
GeneralacmStreamOpen returns MMSYSERR_INVALPARAM when I try to use it. All help appreciated. Pin
Redeemer-dk8-Sep-02 5:07
Redeemer-dk8-Sep-02 5:07 
I have an app where I want to convert audio from one format (PCM WAVE) to another. I've looked at the MSDN and I found out that you should first call acmStreamOpen. I've made a dialog that enumerates all the avaiable drivers, so you can select which driver you want to use for converting. But when acmStreamOpen is called, it returns MSYSERR_INVALPARAM which means "At least one parameter is invalid.". Here's my code:
void OnConvert()
{
	ACMFORMATDETAILS formatdetails;
	ACMDRIVERDETAILS driverdetails;
	HACMSTREAM hConvert;
	HACMDRIVER hAcm;
	WAVEFORMATEX wSource;
	WAVEFORMATEX wTarget;
	int res;
	DWORD cbwfx;
	
	acmDriverOpen(&hAcm, hCurrentDriver, 0);

	memset(&wSource, 0, sizeof wSource);
	memset(&wTarget, 0, sizeof wTarget);
	acmMetrics((HACMOBJ)hAcm, ACM_METRIC_MAX_SIZE_FORMAT, &cbwfx);

	wSource.wFormatTag = WAVE_FORMAT_PCM;
	wSource.nChannels = 2;
	wSource.nSamplesPerSec = 44100;
	wSource.nAvgBytesPerSec = 176400;
	wSource.nBlockAlign = 4;
	wSource.wBitsPerSample = 16;
	wSource.cbSize = 0; //sizeof(wSource);

	wTarget.wFormatTag = 85; //Lame MP3
	wTarget.nChannels = 2;
	wTarget.nSamplesPerSec = 44100;
	wTarget.nAvgBytesPerSec = 176400;
	wTarget.nBlockAlign = 4;
	wTarget.wBitsPerSample = 16;
	wTarget.cbSize = cbwfx - sizeof(WAVEFORMATEX);


	res = acmStreamOpen(&hConvert, hAcm, &wSource, &wTarget, NULL, 0L, 0L, ACM_STREAMOPENF_NONREALTIME | CALLBACK_FUNCTION); //Returns MMSYSERR_INVALPARAM
}

The hCurrentDriver variable is a HACMDRIVERID which contains the desired driver to be used for conversion. The acmDriverOpen returns 0 so nothing should be wrong there. Anyone know what could be wrong? I've been troubling with this for quite some time now.

All help appreciated.

-Rune Svendsen
GeneralZlib and SelfExtactor, size problem?! Pin
PinkPanter8-Sep-02 4:17
PinkPanter8-Sep-02 4:17 
GeneralRe: Zlib and SelfExtactor, size problem?! Pin
carrie8-Sep-02 10:02
carrie8-Sep-02 10:02 
GeneralHowto remove taskbar icon of <font color = blue>CWnd</font> derived (Not <font color = blue>CDialog</font>!) Pin
BlackSmith8-Sep-02 3:30
BlackSmith8-Sep-02 3:30 
GeneralRe: Howto remove taskbar icon of <font color = blue>CWnd</font> derived (Not <font color = blue>CDialog</font>!) Pin
Paul M Watt8-Sep-02 5:08
mentorPaul M Watt8-Sep-02 5:08 
GeneralCreating Word Document With C++ Pin
insanely4207-Sep-02 23:12
insanely4207-Sep-02 23:12 
GeneralRe: Creating Word Document With C++ Pin
Stephane Rodriguez.7-Sep-02 23:51
Stephane Rodriguez.7-Sep-02 23:51 
GeneralCTabCtrl and CDialog Pin
Anonymous7-Sep-02 21:45
Anonymous7-Sep-02 21:45 
GeneralRe: CTabCtrl and CDialog Pin
.dan.g.8-Sep-02 1:03
professional.dan.g.8-Sep-02 1:03 
GeneralRe: CTabCtrl and CDialog Pin
Anonymous8-Sep-02 5:43
Anonymous8-Sep-02 5:43 
GeneralRe: CTabCtrl and CDialog Pin
.dan.g.8-Sep-02 13:52
professional.dan.g.8-Sep-02 13:52 
GeneralVC++ dll in VB Pin
dsfasdfadsfasdfadsf7-Sep-02 20:13
dsfasdfadsfasdfadsf7-Sep-02 20:13 
GeneralRe: VC++ dll in VB Pin
Nish Nishant7-Sep-02 20:21
sitebuilderNish Nishant7-Sep-02 20:21 
GeneralRe: VC++ dll in VB Pin
Anonymous7-Sep-02 20:26
Anonymous7-Sep-02 20:26 
GeneralRe: VC++ dll in VB Pin
Christian Graus8-Sep-02 2:03
protectorChristian Graus8-Sep-02 2:03 
General_rmdir and errno question... Pin
rodrix7-Sep-02 19:47
rodrix7-Sep-02 19:47 
GeneralRe: _rmdir and errno question... Pin
Nish Nishant7-Sep-02 20:19
sitebuilderNish Nishant7-Sep-02 20:19 
GeneralSQL Server & MFC Pin
zuken217-Sep-02 19:50
zuken217-Sep-02 19:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.