From: "Ronald Hoek" Newsgroups: borland.public.delphi.multimedia References: <3ad173fc$1_1@dnews> Subject: Re: How to Play Audio from memory using Delphi's TMediaPlayer Date: Thu, 12 Apr 2001 17:11:47 +0200 Lines: 46 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 NNTP-Posting-Host: 194.109.49.94 Message-ID: <3ad5c634_1@dnews> X-Trace: dnews 987088436 194.109.49.94 (12 Apr 2001 08:13:56 -0700) Path: dnews Xref: dnews borland.public.delphi.multimedia:1398 You can't. You have to use the sndPlaySound function from the MMSystem unit. procedure PlaySound; var MemStream : TMemoryStream; begin try MemStream := TMemoryStream.Create; // Do you're stuf here to add the data to the memorystream // ex. MemStream.LoadFromStream // or MemStream.LoadFromFile // The following line will play the memorystream sndPlaySound(MemStream.Memory, SND_SYNC or SND_MEMORY); finally // Don't forget to free op the memorystream MemStream.Free; end; end; -- M.v.g. Ronald Hoek Applicatiebeheerder ComponentAgro B.V. Barendrecht Tel. 0180-621306 Fax. 0180-611797 mailto:hoek@componentagro.nl http://www.componentagro.nl Manos Aggelakis schreef in berichtnieuws 3ad173fc$1_1@dnews... > Does anyone know if it's possible to play audio files from memory (without > physical existance of the file on disk), using Delphi's TMediaPlayer > component ? > >