0

Hello I know how to add a continuous music loop during an Inno Setup Install using BASS Audio Library.

But in this post, (which made me decide to use BASS.dll to do a continuous music loop during my Inno Setup Install), doesn't seems to be defined all flags supported by BASS.dll.

When I used the code described in this post, BASS Audio Library doesn't loop the playing MP3 File. It restarts the playback after the file completed playing successfully. Also second start takes more than 2 seconds. This is not a loop as I think.To be a loop, the audio file must continue re-playing with minimum gaps.

This post only defined EncodingFlag and BASS_SAMPLE_LOOP Flags to used with Pascal Script of Inno Setup.

But there seems to be more useful flags that can be used with BASS.dll such as BASS_SAMPLE_FLOAT,BASS_SAMPLE_PRESCAN.

I don't know how to define all Flags that supported by BASS.dll in Inno Setup like :

[Code]
const
  BASS_SAMPLE_LOOP = 4;
  BASS_ACTIVE_STOPPED = 0;
  BASS_ACTIVE_PLAYING = 1;
  BASS_ACTIVE_STALLED = 2;
  BASS_ACTIVE_PAUSED  = 3;
  BASS_UNICODE = $80000000;
  BASS_CONFIG_GVOL_STREAM = 5;

How can I define all Flags supported by BASS.dll?

I want to know this because I want to loop my MP3 Audio File after a specified time continuously.

Not to continuously loop from file's beginning to end.

Thanks in Advance.

Community
  • 1
  • 1
GTAVLover
  • 1,407
  • 3
  • 22
  • 41

1 Answers1

1

Use the same syntax as you have in your question to define the additional flags.

Values of the additional flags are defined here:
http://bass.radio42.com/help/html/fdf43f28-d1cd-2951-c126-3ce35edaa7f5.htm

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
  • Thank you very much for giving me their values ......But Why can't I use like `procedure InitializeWizard(); begin BASS_Init(-1, 44100, 0, WizardForm.Handle, 0); SoundStream := BASS_StreamCreateFile(False,ExpandConstant('{tmp}\music.mp3'), 0, 0, 0, 0 ,BASS_SAMPLE_LOOP); BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, 1500); BASS_ChannelPlay(SoundStream, False); end;` ? Changing code like this makes `BASS` won't play anything.I only removed the `EncodingFlag` Flag. – GTAVLover Jul 09 '16 at 01:19
  • I assume you have to set the "unicode" flag in Unicode version of Inno Setup. – Martin Prikryl Jul 09 '16 at 03:35
  • 1
    Ahh Okay you mean if I set any flag for `BASS.dll`, I must combine it with `EncodingFlag`.Thank You.I will do the rest and notify you what happened. – GTAVLover Jul 09 '16 at 04:17
  • Thanks all Flags working now.........I like to know what Flag can I use with `BASS` to loop my MP3 File after a specified time continuously as I asked in question? Like mentioning a specified looping time? – GTAVLover Jul 09 '16 at 14:09
  • What makes you believe there's some magic flag for that? It's even technically not possible. A flag is just yes/no, it cannot hold a value (timeout). Looks like you have an [XY Problem](http://xyproblem.info/). You should probably ask a question for your real problem, without assuming some solution. Though I would start by double-checking that there is no 2s silent interval in the MP3 itself. – Martin Prikryl Jul 09 '16 at 18:40
  • Okay okay however thank you for giving value list. :) – GTAVLover Jul 10 '16 at 08:57