Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi Play MP3 from memory using IGraphBuilder (https://www.delphipraxis.net/108485-play-mp3-memory-using-igraphbuilder.html)

ijcro 14. Feb 2008 15:37


Play MP3 from memory using IGraphBuilder
 
Hello

Sorry, can anybody tell me how play MP3 from memory (when is known pointer and size of block memory) through IGraphBuilder like example from this forum?

Delphi-Quellcode:
procedure TForm1.btnRenderFileClick(Sender: TObject);
var
  pGraph: IGraphBuilder;
  pControl: IMediaControl;
  pEvent: IMediaEvent;
  evCode: Integer;
  strPath: string;
  wstrFileName: PWideChar;
begin
  CoInitialize(nil);
  GetMem(wstrFileName, MAX_PATH);
  try
    CoCreateInstance(CLSID_FilterGraph, nil, CLSCTX_INPROC_SERVER,IID_IGraphBuilder,pGraph);
    pGraph.QueryInterface(IID_IMediaControl,pControl);
    pGraph.QueryInterface(IID_IMediaEvent,pEvent);
    {-----}
    strPath := FilenameEdit1.Text;
    MultiByteToWideChar(CP_ACP, 0, PChar(strPath), -1, wstrFileName, MAX_PATH);
    if Succeeded(pGraph.RenderFile(wstrFileName,nil)) then
    {-----}
    begin
      if Succeeded(pControl.Run) then begin
        pEvent.WaitForCompletion(INFINITE,evCode);
      end;
    end;
  finally
    CoUninitialize();
    FreeMem(wstrFileName, MAX_PATH)
  end;
end;
Can be use pGraph.Render(pPin) and how please?

Thank you.

lbccaleb 12. Jul 2008 12:36

Re: Play MP3 from memory using IGraphBuilder
 
its verry late, but you can find somthing for your problem in the dspack-forum!
watch here:
play from memory stream

i hope it can help you...


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:27 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz