From: Chad A. <ae...@ae...> - 2005-09-03 22:29:06
|
I don't know much about Delphi or the Audiere-Delphi bindings but I believe you have to manually refcount your objects... check to see if there are ref() and unref() methods. device = opendevice(...) device->ref() device->opensound(...) device->unref() // device goes bye now. HTH, Chad User wrote: > Hi > > I have a problem with Audiere in Delphi (a'yup, the old, 1.9.2 binding, > which - surprisingly - works). When i OpenSound any file, i get an > exception ("Project waha.exe raised exception class EExternalException > with message 'External exception C000001E'."). After "unpausing" the > process, the file is played back normally. What's wrong? The source for > this project is painfully simple: > > > > uses > Windows, Messages, Graphics, Forms, Dialogs, audiere, > ExtCtrls, StdCtrls, Classes, Controls; > > type > TForm1 = class(TForm) > Timer1: TTimer; > CloseBaton: TImage; > MinimizeBaton: TImage; > PlayMe: TImage; > procedure QuitProgramlol(Sender: TObject); > procedure FormMinimizelol(Sender: TObject); > procedure Showoff(Sender: TObject); > procedure PlayMeClick(Sender: TObject); > private > { Private declarations } > public > { Public declarations } > end; > > > var > Form1: TForm1; > Device: ^TAdrAudioDevice; > Sound : ^TAdrOutputStream; > > [... blah blah blah ...] > > procedure TForm1.PlayMeClick(Sender: TObject); > begin > Device := AdrOpenDevice('winmm', ''); > Sound := AdrOpenSound(Device, AdrOpenSampleSource('burzujtest_it.ogg'), > False); > Device.Ref; > Sound.Ref; > Sound.Play; > end; > > > Note, that the project is based on a form with three buttons, and a > timer, nothing else. > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Audiere-users mailing list > Aud...@li... > https://lists.sourceforge.net/lists/listinfo/audiere-users |