Click here to Skip to main content
15,881,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual C++ 2022 cout bug? Pin
Richard MacCutchan12-May-23 2:09
mveRichard MacCutchan12-May-23 2:09 
GeneralRe: Visual C++ 2022 cout bug? Pin
Shao Voon Wong12-May-23 2:15
mvaShao Voon Wong12-May-23 2:15 
GeneralRe: Visual C++ 2022 cout bug? Pin
Richard MacCutchan12-May-23 3:10
mveRichard MacCutchan12-May-23 3:10 
GeneralRe: Visual C++ 2022 cout bug? Pin
jschell12-May-23 9:56
jschell12-May-23 9:56 
GeneralRe: Visual C++ 2022 cout bug? Pin
Richard MacCutchan12-May-23 22:24
mveRichard MacCutchan12-May-23 22:24 
GeneralRe: Visual C++ 2022 cout bug? Pin
Shao Voon Wong12-May-23 2:03
mvaShao Voon Wong12-May-23 2:03 
QuestionPlaying an mp3 file using MCI Pin
Derell Licht11-May-23 10:34
professionalDerell Licht11-May-23 10:34 
AnswerYou might as well use DirectShow to play MP3 and AAC. Pin
Shao Voon Wong11-May-23 15:55
mvaShao Voon Wong11-May-23 15:55 
This is a Simple C++ DirectShow MP3 Player Class for native C++ and .NET.

This is an example on how to use the Mp3 class.
C++
<h1>include "Mp3.h"</h1>

void main()
{
    // Initialize COM
    ::CoInitialize(NULL);

    std::wcout<<L"Enter the MP3 path: ";
    std::wstring path;
    getline(wcin, path);

    std::wcout<<path<<std::endl;

    Mp3 mp3;

    int status = 0;
    if(mp3.Load(path.c_str()))
    {
        status = SV_LOADED;
    }
    else // Error
    {
        // ...
    }

    if(mp3.Play())
    {
        status = SV_PLAYING;
    }
    else // Error
    {
        // ...
    }

    // ... after some time

    if(mp3.Stop())
    {
        status = SV_STOPPED;
    }
    else // Error
    {
        // ...
    }

    // Uninitialize COM
    ::CoUninitialize();
}


modified 12-May-23 8:19am.

AnswerRe: Playing an mp3 file using MCI Pin
Derell Licht12-May-23 9:10
professionalDerell Licht12-May-23 9:10 
QuestionMessage Closed Pin
10-May-23 8:07
Member 1496877110-May-23 8:07 
AnswerRe: another "everybody knows that " question on C++ : Preserved for posterity Pin
k505410-May-23 8:43
mvek505410-May-23 8:43 
AnswerRe: another "everybody knows that " question on C++ Pin
k505410-May-23 9:05
mvek505410-May-23 9:05 
GeneralMessage Closed Pin
10-May-23 9:54
Member 1496877110-May-23 9:54 
GeneralRe: another "everybody knows that " question on C++ Pin
k505410-May-23 10:31
mvek505410-May-23 10:31 
GeneralRe: another "everybody knows that " question on C++ Pin
jschell11-May-23 4:57
jschell11-May-23 4:57 
GeneralRe: another "everybody knows that " question on C++ Pin
harold aptroot10-May-23 10:39
harold aptroot10-May-23 10:39 
GeneralMessage Closed Pin
10-May-23 11:26
Member 1496877110-May-23 11:26 
GeneralRe: another "everybody knows that " question on C++ Pin
Richard MacCutchan10-May-23 21:46
mveRichard MacCutchan10-May-23 21:46 
AnswerRe: another "everybody knows that " question on C++ Pin
jschell11-May-23 5:10
jschell11-May-23 5:10 
GeneralMessage Closed Pin
11-May-23 6:32
Member 1496877111-May-23 6:32 
GeneralRe: another "everybody knows that " question on C++ Pin
Richard MacCutchan11-May-23 9:05
mveRichard MacCutchan11-May-23 9:05 
RantMessage Closed Pin
12-May-23 9:35
Member 1496877112-May-23 9:35 
GeneralRe: another "everybody knows that " question on C++ Pin
OriginalGriff12-May-23 23:32
mveOriginalGriff12-May-23 23:32 
GeneralRe: another "everybody knows that " question on C++ Pin
jschell12-May-23 9:36
jschell12-May-23 9:36 
QuestionMessage Closed Pin
8-May-23 6:28
Member 149687718-May-23 6:28 

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.