Click here to Skip to main content
15,903,807 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Can D simulated by H terminate normally? Pin
jschell17-May-23 7:00
jschell17-May-23 7:00 
GeneralMessage Closed Pin
18-May-23 4:39
polcott18-May-23 4:39 
GeneralRe: Can D simulated by H terminate normally? Pin
Richard MacCutchan18-May-23 4:57
mveRichard MacCutchan18-May-23 4:57 
GeneralMessage Closed Pin
18-May-23 5:05
polcott18-May-23 5:05 
GeneralRe: Can D simulated by H terminate normally? Pin
jschell18-May-23 5:49
jschell18-May-23 5:49 
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 

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.