18 May '13 - 16:59 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  Developments / BASS / Re: Handle in BASS_Init what is it used for ? on: 4 Jan '12 - 00:03
Hi

Thanks, then I can just get one like this:

HWND hWnd = GetForegroundWindow();
if (hWnd == NULL)
{
  hWnd = GetDesktopWindow();
}
as suggested by Mickeysoft under IDirectSound.

Best regards
Asger-P
ReplyReply Reply with quoteQuote
2  Developments / BASS / Re: BASS_ChannelSetSync confused about "data" on: 3 Jan '12 - 23:42
"data" in the sync definitions (in the BASS_ChannelSetSync documentation) refers to what the callback function (SYNCPROC) will receive in its "data" parameter when the sync is triggered.

Hi Ian

Thank You very much.
Now it all make much more sense.

Best regards
Asger-P
ReplyReply Reply with quoteQuote
3  Developments / BASS / Re: How to stop a file playing at a certain point ? on: 3 Jan '12 - 11:05

You should use BASS_ChannelSetSync with flag BASS_SYNC_POS. Put your 2,54 time as the param (in bytes). In the sync proc/callback you call  BASS_ChannelStop.


Thanks Ken

Why didn't I think of that I knew I could set a syncpos, I saw that in the custloop example I just never thought of stopping the channel my self, when getting the call back......

Thanks for waking me!

Best regards
Asger-P
ReplyReply Reply with quoteQuote
4  Developments / BASS / How to stop a file playing at a certain point ? on: 3 Jan '12 - 00:51
Hi

Is it possible to make a filestream stop playing after e.g. 2min. 54sec. of playing and receive a callback when it does stop ?

I have learned how to get a callback when the stream reaches its natural end, like this:
BASS_ChannelSetSync( FChannel, BASS_SYNC_END|BASS_SYNC_MIXTIME, 0, EndTrackProc, FHandle );

but how do I do the same for a specified time ?

Thanks in advance
Best regards
Asger-P
ReplyReply Reply with quoteQuote
5  Developments / BASS / BASS_ChannelSetSync confused about "data" on: 3 Jan '12 - 00:45
Hi

I'm a little confused about BASS_ChannelSetSync, the help mention a data  parameter a lot of times, but I cant see any data parameter in the defenition

HSYNC BASS_ChannelSetSync(
    DWORD handle,
    DWORD type,
    QWORD param,
    SYNCPROC *proc,
    void *user
);

e.g. it says:
BASS_SYNC_DOWNLOAD
mixtime only Sync when downloading of an internet (or "buffered" user file) stream is done.
param : not used. data : not used. 

other times data is used, but what parameter does it refer to ??

Thanks in advance
Best regards
Asger-P
ReplyReply Reply with quoteQuote
6  Developments / BASS / Handle in BASS_Init what is it used for ? on: 2 Jan '12 - 09:10
Hi

I was wondering why the init function takes a window handle, I have not yet seen anything where BASS use such a handle and since I only used a very small part of BASS I am asking: Is that handle ever used for anything ?

Thanks in advance
Asger-P
ReplyReply Reply with quoteQuote
7  Developments / BASS / Re: Bitrate on: 24 Dec '11 - 22:34
Assuming you already have code to read bitrate, BASS_StreamGetFilePosition will
tell you the byte position in the file at any given time:

No, I dont have code to read bitrate, from the byte position.
Do You know where I can find such code ?

Actually I find it a little surprising that there isn't a function like e.g. GetCurrentBitrate, the motor that do the playing must know the bitrate for each frame it's reading, so it would be easy to reply that to such a function call, but thats just my thought.

Thanks for Your reply
Best regards
Asger-P
ReplyReply Reply with quoteQuote
8  Developments / BASS / Bitrate on: 24 Dec '11 - 11:38
Hi

I have found the example to get the average bit-rate of a file, but  when I play files with Variable bit-rates I would like to show it changing as the music play, so my question is:

How to determine the bit-rate at a given time in the Channel stream. ?

Thanks in advance
Best regards
Asger-P
ReplyReply Reply with quoteQuote
9  Developments / BASS / Re: Some questions from a BASS newbee on: 23 Dec '11 - 12:19

ChannelIsActive shows the state of the stream e.g. paused/playing/stalled.


That was just what I was looking for.

Thanks
Best regards
Asger-P
ReplyReply Reply with quoteQuote
10  Developments / BASS / Re: Some questions from a BASS newbee on: 22 Dec '11 - 22:54
To get a notification of a position in a song or the end, check out the bass_ChannelSetSync method.

Thank You very much, that work like a charm

Best regards
Asger-P
ReplyReply Reply with quoteQuote
11  Developments / BASS / Some questions from a BASS newbee on: 22 Dec '11 - 00:47
Hi

So far I have managed:

BASS_Init
BASS_StreamCreateFile
BASS_ChannelPlay
BASS_ChannelPause
BASS_ChannelStop
BASS_StreamFree
BASS_Free
+ Volume control

But I cant seem to find a way to get notified when the file is finished playing, so I can start the next one.
Is there a CallBack for that ?

I tried comparing BASS_ChannelGetPosition  to the BASS_ChannelGetLength I get when I start the channel,  but they dont get to be equal when the mp3 have variable bit-rate.
How do You know when the channel is done playing ?

I also have some trouble finding the best way to manage a progress bar.
I can see in the custloop.c that they use a Timer to update the position in the track, Is that the best way ?

Is there a way to ask the Chanel if it is playing stopped or paused ?
or do I have to manage my own flags ?

And at last, is there a smart way to fade one track down just before starting the next with a fade up I'm thinking one second or so.

I'm using Win7 and C++Builder 2009.

Thanks in advance and thanks for the great work
Best regards
Asger-P
ReplyReply Reply with quoteQuote
Pages: [1]
Powered by SMF 1.1.18 | SMF © 2013, Simple Machines