[Vorbis-dev] getting started

Steve Russell srussell
Sun Jun 27 10:51:40 PDT 2004


<002001c45c5e$20eb28a0$0100000a at tiger>
Message-ID: <000b01c45c6f$66d1d790$5b1082cd at stever>

Wow, thanks!  I hate to keep asking such basic questions, but could I get
just a little comment on how or where this stuff fits into the mmio /
waveOut functions I am presently using to play my standard wave files?  My
audio typically plays at the beginning of each cycle in a series of
interactive educational activities and in response to incorrect drag and
drop choices.  I do not provide the user with any audio choices.  My stuff
resembles a game, and often requiring pretty low latency at that.
----- Original Message -----
From: "illiminable" <ogg at illiminable.com>
To: <vorbis-dev at xiph.org>
Sent: Sunday, June 27, 2004 11:47 AM
Subject: Re: [Vorbis-dev] getting started


> > >
> > > All you have to do is
> > >
> > > 1) Create a filtergraph object with COM
> > > 2) get an Igraphbuilder interface
> > >
> >
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/htm/igraphbuilderinterface.asp
> > > using COM.
> > > IGraphBuilder* locGraphBuilder;
> > >  HRESULT hr = CoCreateInstance(CLSID_FilterGraph, NULL,
> > > CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&locGraphBuilder);
> > > 3) Call RenderFile on the IGraphbuilder interface with the filename
> > > 4) get an IMediaControl interface from the filter graph
> > > 5) Call play on the IMediaControl  interface.
> > >
> > > All the codec stuff will be done automagically behind the scenes, so
> long
> > as
> > > my filters are installed.
> > >
> > > Zen.
> > >
>
> Actually today i needed a simple player to do some testing... so here's
the
> entire code for a *zero* feature, *zero* error checking command line audio
> player for ogg... requires my filters installed... and you need to link to
> strmiids.lib. Actually it will play any audio format... mp3s wmas,
anything
> directshow has a filter for. This should get you started, and hopefully be
a
> good starting point for anyone wanting to integrate ogg simply into
windows.
> Obviously there's more to make it functional... but it's a starting point.

> It will be in the subversion repository as an example on my next checkin.
>
> // CLOgg.cpp : Command line minimalist audio player.
> //
>
> #include "stdafx.h"
> #include <dshow.h>
> #include <windows.h>
> #include <iostream>
> using namespace std;
> int _tmain(int argc, _TCHAR* argv[])
> {
>  IGraphBuilder* locGraphBuilder = NULL;
>  IMediaControl* locMediaControl = NULL;
>  HRESULT locHR;
>  CoInitialize(NULL);
>  locHR = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
> IID_IGraphBuilder, (void **)&locGraphBuilder);
>  locHR = locGraphBuilder->RenderFile(L"g:\\h.ogg", NULL);
>
>  locHR = locGraphBuilder->QueryInterface(IID_IMediaControl,
> (void**)&locMediaControl);
>
>  locHR = locMediaControl->Run();
>
>  //Wait till you enter a number and press enter to exit.
>  int x;
>  cin>>x;
>  locMediaControl->Release();
>  locGraphBuilder->Release();
>  CoUninitialize();
>
>  return 0;
> }
>
> Enjoy,
>
> Zen.
>
>
>
> _______________________________________________
> Vorbis-dev mailing list
> Vorbis-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/vorbis-dev



More information about the Vorbis-dev mailing list