Article View: comp.os.ms-windows.programmer.misc
Article #1624Question about playing wave-files
From: Alwin Hoogerdijk
Date: Thu, 15 Oct 1992 12:46
Date: Thu, 15 Oct 1992 12:46
40 lines
2416 bytes
2416 bytes
Hi , I am exploring the multimedia functions in the Windows 3.1 API. But there's something I don't understand and I can't find the answer in the Borland books, the help files or the samples, so I thought that maybe one of you could help me. I am writing a sample editor for windows, so I need to output sound using a wave-audio device. As far as I understand it, there are the following methods of doing WAVE-I/O : - using sndPlaySound : very easy to use, plays waves from disk or from memory, but sound cannot be paused and cannot be played from and to specific points in the sample. - using the low level functions : rather difficult to use, this method seems not necessary for my application. - using MCI commands or strings : still easy to use, everything I want to do is possible (play, stop, pause, resume, record, play from/to), so this seems to be the perfect method when writing a sample editor. But there is one thing I don't get : Is it possible to play a wave-file directly from memory, as with sndPlaySound ? When you open a device, you use a filename to indicate what you want to play. So how do I do this ? I want to be able to play waves from memory, to pause the output and to play from and to a position in the sample. Do I really have to use the low level functions to do this. This seems too much trouble for my app, because the MCI-commands seem to provide everything I need. For the time being I use sndPlaySound, so I have output, but not the way I want it. Could somebody provide me with the information I need ? Thanx for your time, Alwin Hoogerdijk Faculty of Technical Mathematics and Informatics Delft University of Technology Holland Email : alwin@dutisa.twi.tudelft.nl -- | Alwin Hoogerdijk | Email : alwin@dutisi.twi.tudelft.nl | | Delft University of Technology | |
Technical Details
Message-ID:
<1992Oct15.124658.6281@donau.et.tudelft.nl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!dutrun!donau!zen.et.tudelft.nl!alwinShow Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!dutrun!donau!zen.et.tudelft.nl!alwin From: alwin@zen.et.tudelft.nl (Alwin Hoogerdijk) Subject: Question about playing wave-files Message-ID: <1992Oct15.124658.6281@donau.et.tudelft.nl> Sender: news@donau.et.tudelft.nl (UseNet News System) Nntp-Posting-Host: zen.et.tudelft.nl Organization: Delft University of Technology, Dept. of Electrical Engineering Date: Thu, 15 Oct 1992 12:46:58 GMT Lines: 40