Re: So is there some easy function... Re: How do I play muLaw sound.
- From: "Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp>
- Date: Mon, 27 Mar 2006 10:58:00 -0500
Webster wrote:
So is there some easy function to play muLaw audio on the PC?
Do I have to first convert my muLaw data to this 16-bit format and then play it. What function do I call to play it.
I know virtually nothing about audio formats or about playing the audio. I was given an example on how to create .wav files from the muLaw data. I can do that fine. What I want to do now is play the audio on the PC which has the audio. I do NOT want to create .wav files first. Sometimes my audio is many seconds or minutes long and I want to begin hearing the audio as soon as possible. So I want to play the audio ASAP. I don't want to first create a .wav file and then play the file.
What steps do I need to do to play the muLaw audio? Are there functions that I can use?
I am using Visual C++ version 6. I can upgrade if I have to.
You can play mulaw audio without creating a WAV file. Use waveOutOpen and related waveOut... APIs. No conversion of the data format is needed.
But, playing continuous audio is not easy to program. You need to use multiple small buffers. Output two of them at the start (waveOutWrite). After the first one has been played it will be returned to you. While the second buffer is being played you have to refill the first and output it. This queued juggling act will give you continuous audio with no breaks between buffers.
--
Scott McPhillips [VC++ MVP]
.
- Follow-Ups:
- References:
- How do I play uLaw sound.
- From: Webster
- Re: How do I play uLaw sound.
- From: Headache
- So is there some easy function... Re: How do I play muLaw sound.
- From: Webster
- How do I play uLaw sound.
- Prev by Date: Re: Loading DLLs having classes
- Next by Date: Re: Is there any funtion which gets called when I click on the title bar of a dialog??
- Previous by thread: So is there some easy function... Re: How do I play muLaw sound.
- Next by thread: Re: So is there some easy function... Re: How do I play muLaw sound.
- Index(es):
Relevant Pages
|
Loading