25 May '13 - 07:48 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Mixer plays too fast  (Read 624 times)
MikeV
Posts: 88


« on: 18 Jan '11 - 11:38 »
Reply with quoteQuote

If I add a stream to a mixer stream and play that, it plays too fast. Sounds is as if someone is repeatedly pressing a seek forward button.. Am I doing something wrong?

Relevant code:

hMixer = BASS_Mixer_StreamCreate(44100, 2, 0);
hPlayer = BASS_StreamCreateFile(false, "file", 0, 0, BASS_STREAM_DECODE);
BASS_Mixer_StreamAddChannel(hMixer, hPlayer, 0);
BASS_ChannelPlay(hMixer, false);
Logged
muntablues
Posts: 191


« Reply #1 on: 18 Jan '11 - 11:47 »
Reply with quoteQuote

There is somewhere a ChannelGetData on hPlayer stream. ChannelGetData seeks on your source and that causes exactly what you say...
Logged
MikeV
Posts: 88


« Reply #2 on: 18 Jan '11 - 12:12 »
Reply with quoteQuote

Thank you, but I am not calling that function (see my code above).
Logged
muntablues
Posts: 191


« Reply #3 on: 18 Jan '11 - 12:19 »
Reply with quoteQuote

Maybe a visual effect or a VU meter? If you really have just these four lines, it should work fine...
Logged
MikeV
Posts: 88


« Reply #4 on: 18 Jan '11 - 12:33 »
Reply with quoteQuote

Ah, now I understand our reasoning. It's ChannelGetLevel() that's causing it! Thanks. It's even documented, however they don't mention how I can get the channel's level if I am not allowed to use this function. I need it for my peak meter to work..

Update: some searching reveiled the solution: http://www.un4seen.com/forum/?topic=10113.0
« Last Edit: 18 Jan '11 - 12:38 by MikeV » Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines