I messed around with some code real quick and
made a graphical VU meter. Very simple right now, just a white line on a black background.
One problem Im having. GetVUmeter needs a channel, but the only way to get a channel is to playsound. Doing this, the VU jumps on sound input and output as opposed to just on the input.
Any way around this? I was thinking of just turning the sound all the way down on playsound. I can post or email source if anyone wants it. Its very hackish with a lot of cut and paste, but it may give someone ideas. I used opengl to handle the complex drawing routines (lol! A single white line bouncing around).
I’ve encountered the same anomaly. I got the recording function to work in my tests, but to GetCurrentVU, it seems you must PlaySound on the recording channel at full volume -SetMute or SetVolume to 0 gives a silent VU
Since I use “What U Hear” usually on my SB Live!, everything ends up echoing when the record mode is on. The only way to avoid this is to force recording to Mic only, and make sure Mic is muted in Windows mixer playback.
Is there an alternative way of saving the sample data to some sort of array or file, and analyzing that in realtime? (all I need is VU, not spectrum) My ultimate goal here is to stream using FMOD and Shoutcast DNAS/Icecast, bypassing Winamp entirely.
Ok, ok… I know the last item is a hefty task not answered within Fmod’s scope, as I’d have to mixdown all the audio inputs and pass thru an mp3 codec to stream to the Shoutcast DNAS… But I can dream cant I? I’ll figure it out sometime in the next millenium
Lets just start by knowing how I can get the VU for the mic/line input without using PlaySound on the fmod record channel. And brett or anyone, if you can explain to me again how to get Stereo VU values on a stream, sample, etc. I’d appreciate it!
I’m in the same boat as K6Deux.
I’d like to be able to call getspectrum on the recording rather than the play back.
As a callback or something similar would be great.
Brett mentioned something about the recording inner loop, but I’m not sure what that means.
Also, where is the recording sample program being spoken of?
<font size=-1>[ This Message was edited by: ApolloAndy on 2002-03-05 12:35 ]</font>
But the sample doesnt address the specifics I’m after. I did indeed look at it and tested modifications to it in my VB app.
Still, if whatever you record from is not muted in playback (Waveout, Microphone), it echoes all the time because its recording the sample playback as well as the original input.
I’m trying to find a way to get the VU or save the data to a file WITHOUT having to playback the recorded sample. Not simply to duplicate what the sample code is doing. I know you’ve read my other posts about my goal to eventually use Fmod as a bridge to broadcasting with Shoutcast.
I’m not lazy or mad about Fmod, I dont know why your replies to me seem to imply this. Don’t stress out on us man, your work is good.
For the recording part:
ofcourse first init fmod and then:
1. Use FSOUND_Sample_Alloc to allocate a sample
2. Use FSOUND_Record_StartSample to start recording
3. When recording is done, use FSOUND_Sample_Lock to lock the data (that is needed before you can read it)
4. I think FMOD doesn’t support encoding, so you’ll need the ogg-vorbis sdk or something to encode your files.
I cannot help you with the ogg-vorbis part, cause I’ve never used ogg vorbis…
- nathanb answered 15 years ago
Anybody feel generous to share a snippet of code that can record from the mic in realtime and get a VU level with Fmod?
I already have timers and other things in place, just not sure about parsing the sample data … preferably VB, but I can decipher C code if I must. FMOD itself seems quite easy despite all the complicated options
Please login first to submit.