Click here to Skip to main content
15,890,282 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionVisual C++ 2022 cout bug? Pin
Shao Voon Wong11-May-23 15:47
mvaShao Voon Wong11-May-23 15:47 
AnswerRe: Visual C++ 2022 cout bug? Pin
Dave Kreskowiak11-May-23 16:04
mveDave Kreskowiak11-May-23 16:04 
GeneralRe: Visual C++ 2022 cout bug? Pin
Shao Voon Wong11-May-23 16:16
mvaShao Voon Wong11-May-23 16:16 
GeneralRe: Visual C++ 2022 cout bug? Pin
Dave Kreskowiak12-May-23 4:09
mveDave Kreskowiak12-May-23 4:09 
GeneralRe: Visual C++ 2022 cout bug? Pin
Shao Voon Wong12-May-23 2:02
mvaShao Voon Wong12-May-23 2:02 
GeneralRe: Visual C++ 2022 cout bug? Pin
Dave Kreskowiak12-May-23 17:54
mveDave Kreskowiak12-May-23 17:54 
GeneralRe: Visual C++ 2022 cout bug? Pin
Shao Voon Wong13-May-23 0:29
mvaShao Voon Wong13-May-23 0:29 
GeneralRe: Visual C++ 2022 cout bug? Pin
Graham Breach11-May-23 21:31
Graham Breach11-May-23 21:31 
GeneralRe: Visual C++ 2022 cout bug? Pin
Shao Voon Wong11-May-23 22:12
mvaShao Voon Wong11-May-23 22:12 
GeneralRe: Visual C++ 2022 cout bug? Pin
Richard MacCutchan12-May-23 1:09
mveRichard MacCutchan12-May-23 1:09 
GeneralRe: Visual C++ 2022 cout bug? Pin
Shao Voon Wong12-May-23 2:01
mvaShao Voon Wong12-May-23 2:01 
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 

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.