Thread View: borland.public.cppbuilder.multimedia
3 messages
3 total messages
Started by Gustavo Ringel
Sun, 18 Apr 2004 07:41
MCIWndSave is not saving the write name file
Author: Gustavo Ringel
Date: Sun, 18 Apr 2004 07:41
Date: Sun, 18 Apr 2004 07:41
18 lines
1468 bytes
1468 bytes
I tested an MCI sample from Borland Code Center and it works ok, but it not saves the filename ok, and I don't understand why. This is the code (i have changed testing to solve the problem the instruction wsprintf of the sample to strcpy) char file[96]=""; strcpy(file,"aud.wav"); // // now stop audio and save to disk MCIWndStop(m_hMCIWnd); MCIWndSave(m_hMCIWnd, file); MCIWndClose(m_hMCIWnd); It saves the file but with name like ��⹤��v If i change this file name to something.wav it plays ok. Someone knows a solution to this?
Re: MCIWndSave is not saving the write name file
Author: Remy Lebeau (TeamB)
Date: Sun, 18 Apr 2004 09:11
Date: Sun, 18 Apr 2004 09:11
14 lines
1304 bytes
1304 bytes
"Gustavo Ringel" <gringel@adinet.com.uy> wrote in message
news:4082312b$1@newsgroups.borland.com...
> char file[96]="";
> strcpy(file,"aud.wav");
You should be specifying a full path, ie:
char file[MAX_PATH+1]={0};
strncpy(file, "c:\\folder name\\aud.wav", MAX_PATH);
Gambit
Re: MCIWndSave is not saving the write name file
Author: dcent
Date: Mon, 30 Aug 2004 22:06
Date: Mon, 30 Aug 2004 22:06
23 lines
1730 bytes
1730 bytes
Gustavo Ringel wrote:
> I tested an MCI sample from Borland Code Center and it works ok, but it not saves the filename ok, and I don't understand why.
>
> This is the code (i have changed testing to solve the problem the instruction wsprintf of the sample to strcpy)
>
> char file[96]="";
Sounds to me that you are not clearing the buffer. Try:
char file[96]={0};
> strcpy(file,"aud.wav");
> //
> // now stop audio and save to disk
> MCIWndStop(m_hMCIWnd);
> MCIWndSave(m_hMCIWnd, file);
> MCIWndClose(m_hMCIWnd);
>
> It saves the file but with name like ��⹤��v
>
> If i change this file name to something.wav it plays ok.
>
> Someone knows a solution to this?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads