23 May '13 - 16:33 *
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] 2 3 ... 32
1  Developments / BASS / MP3 Stream Editor on: 17 May '13 - 14:02
Hi!

Some interesting progress about my app. MP3 Stream Editor.
Now it is possible to cut Opus and Ogg Vorbis files decodelessly beside MP3.

MP3 Stream Editor has been using BASS for 10 years now, I would like to thank you for your work Ian and for the great support you provide for BASS!

That's all.
ReplyReply Reply with quoteQuote
2  Developments / BASS / Re: New: Delphi Flac Tag Library on: 9 May '13 - 15:33
New version of the library is released.

  • Added full support of reading and writing of Ogg Flac tags

Download in the first post.
ReplyReply Reply with quoteQuote
3  Developments / BASS / Re: BASS_ChannelSlideAttribute and exponential volume fade on: 7 May '13 - 16:27
Agree. Some nice fades would be cool.
ReplyReply Reply with quoteQuote
4  Developments / BASS / Ogg Flac tagger on: 5 May '13 - 15:31
Hi!

Couldn't find so far a tagger which supports Ogg Flac. Tried mp3tag and foobar and some other without success. Does anybody know one?

EDIT: Ok. Found one: http://www.luminescence-software.org/metatogger_fr.html

EDIT 2: Had to change extension to ".oga" now foobar reads the tags written by metatogger but unfortunately the cover art is not showing. Trying to add a cover art in foobar gives an error.
ReplyReply Reply with quoteQuote
5  Developments / BASS / Re: Get Peak-Level without Playing? on: 30 Apr '13 - 10:30
If you are using the BASS_SAMPLE_FLOAT flag in BASS_StreamCreateFile() BASS_ChannelGetData() will give you "FLOAT" or Delphi: "Single" values, you have to make the buffer an array of Single (or FLOAT).
ReplyReply Reply with quoteQuote
6  Developments / BASS / Re: Get Peak-Level without Playing? on: 29 Apr '13 - 17:54
Yes that's true. But Length() will give the number of array elements and you need bytes: Length(buffer) * 4
ReplyReply Reply with quoteQuote
7  Developments / BASS / Re: Position reporting using a mixer in paused state on: 29 Apr '13 - 17:14
Ok. Thank you! Seems working fine.
ReplyReply Reply with quoteQuote
8  Developments / BASS / Position reporting using a mixer in paused state on: 28 Apr '13 - 21:55
Hi!

I use BASS_Mixer_ChannelGetPositionEx() to display a numerical string and a trackbar's position about where the playback is currently.
If I pause the playback with BASS_Mixer_ChannelFlags(Channel, BASS_MIXER_PAUSE, BASS_MIXER_PAUSE);
then everything is fine the position string and the trackbar stops and displays the position where the pause happened.
The problem is that if I move the trackbar and issue a BASS_ChannelSetPosition() on the mixer source channel, while in paused state, the position display string and the trackbar doesn't update, although if I unpause the playback the playback continues from the new position.

Is there a way to have a correct position display while changing position of a mixer source channel in paused mode?

Thank you!

EDIT: Forgot to say that the source channel is splitted 2 ways and I am displaying the splitter's position which are plugged into a mixer.


ReplyReply Reply with quoteQuote
9  Developments / BASS / Re: Get Peak-Level without Playing? on: 27 Apr '13 - 20:48
Is BASS_ChannelGetData() returning always 0 or just sometimes?
Because I don't think your function call is ok.

If you use a dynamic buffer, it should be:

    data_length:= BASS_ChannelGetData(stream_handle, @buffer[0], SizeOf(buffer));
ReplyReply Reply with quoteQuote
10  Developments / BASS / Re: BASS_ChannelSlideAttribute and exponential volume fade on: 26 Apr '13 - 16:15
Sorry to hear that it is tedious work to make a wrapper I never did that myself never wrote a C# code ever.
The API is very simple BTW, there are 5 functions in the dll and 4 structures and a callback. These things are declared in BASSFadeVolumeShapedDefs.pas you can convert it if you decide to make one.

BTW. Maybe support for BASS Fade Volume Shaped could be added to BASS.NET? Roll Eyes

BTW 2. The library sets a BASS DSP proc on the channel so it is very precise and only works with 32bit float sample data.
ReplyReply Reply with quoteQuote
11  Developments / BASS / Re: BASS_ChannelSlideAttribute and exponential volume fade on: 26 Apr '13 - 10:13
Yes you can. Search Google for "using unmanaged dll in c#", it requires a little works as only Delphi API is included but should work with C# the same way as BASS does.
ReplyReply Reply with quoteQuote
12  Developments / BASS / Re: BASS_ChannelSlideAttribute and exponential volume fade on: 24 Apr '13 - 18:27
Alternatively you can use BASS Fade Volume Shaped Library if you are targeting Windows.
ReplyReply Reply with quoteQuote
13  Developments / BASS / Re: [DELPHI] Error setting Envelopes on: 19 Apr '13 - 13:20
Try:

    BASS_Mixer_ChannelSetEnvelope(CS.GetStream, BASS_MIXER_ENV_VOL, @Nodes[0], 2);

or use a static array and:

Var
  Nodes: array[0..1] of BASS_MIXER_NODE; //* 2 nodes
begin
    ...
    BASS_Mixer_ChannelSetEnvelope(CS.GetStream, BASS_MIXER_ENV_VOL, @Nodes, 2);

ReplyReply Reply with quoteQuote
14  Developments / BASS / Re: error getting midi lyrics marks on: 8 Apr '13 - 13:25
Ah, something popped into my mind about what you wrote!
I had some problems with concatenating PChars a couple of years ago (when Delphi went unicode).

Try to first put the PChar string into a Delphi string and concatenate the 2 delphi strings.

var
  Mark: BASS_MIDI_MARK;
  i: integer;
  CallbackData: TCallbackMessage;
  Lyr: string;
  Str: String;
begin
  Lyr := '';
  i := 0;

  while BASS_MIDI_StreamGetMark(Stream, BASS_SYNC_MIDI_LYRIC, i, Mark) do
  begin
    Str := Mark.Text;
    Lyr := Lyr + Str;
    if i = data then
      Lyr := Lyr + '<END_CURRENT>';
    inc(i);
  end;

If this helps then it's probably a Delphi bug.
ReplyReply Reply with quoteQuote
15  Developments / BASS / Re: error getting midi lyrics marks on: 8 Apr '13 - 12:23
Everything looks fine with your code to me... where does it crash?
ReplyReply Reply with quoteQuote
16  Developments / BASS / Re: I need help with SampleVis and BASS_SAMPLE_FLOAT on: 8 Apr '13 - 11:10
My attempt: http://www.3delite.hu/Misc/SampleVis.zip

Couldn't figure out why the circle mode's bottom there's always a straight line which isn't with the original.
ReplyReply Reply with quoteQuote
17  Developments / BASS / Re: error getting midi lyrics marks on: 8 Apr '13 - 10:05
Have you added the massage receiver function to your TFrmMain:

type
    TFrmMain...
    private
        procedure LyricSyncMessageArrived(var Message: TMessage); message MYMSG_CALLBACK; // Add this to the form's private section
        ...

procedure TFrmMain.LyricSyncMessageArrived(var Message: TMessage); // Add this procedure to the form
var
    Data: TCallbackMessage;
begin
    Data := TCallbackMessage(Message.WParam);
    try
        Label.Caption := Data.Text;
    finally
        FreeAndNil(Data);
    end;
end;
ReplyReply Reply with quoteQuote
18  Developments / BASS / Re: BASS_FX_BFX_VOLUME_ENV with Delphi on: 7 Apr '13 - 17:11
That would be cool! Thank you! Smiley

Regarding the code.
BASS expects a pointer to the values (array) and you were using a dynamic array. Delphi treats dynamic arrays differently. So you give BASS the pointer to the first value.
But you can also use a static array, then your code works. Like:  

var
    nodes: array [0..1] of BASS_BFX_ENV_NODE; //* 2 element array
    ...
begin
    ...
    //* No SetLength() is needed
    ...
    Curve.Pnodes:=@nodes; //* Then this works also
    ...

I don't know do you need dynamic array but if yes then it works now. Cool
ReplyReply Reply with quoteQuote
19  Developments / BASS / Re: error getting midi lyrics marks on: 6 Apr '13 - 11:29
You can not add a HWND variable to TSong class? I mean instance of TSong is not part of a HWND capable class? TForm or something?

Alternatively you can create a massage handler for TSong with AllocateHWnd() although I would not prefer it:

   TSong = class
        FHWnd: HWND;
    protected
        procedure WndMethod(var Msg : TMessage);
        ...

procedure TSong.WndMethod(var Msg : TMessage);
var
    Handled: Boolean;
begin
    Handled := True;
    case Msg.Msg of
        WM_LYRICS_MESSAGE: FunctionToProcessTheMessage(TCallbackMessage(Msg.WParam));
    else
        Handled := False;
    end;
    if Handled then begin
        Msg.Result := 0
    end else begin
        Msg.Result := DefWindowProc(FHWnd, Msg.Msg, Msg.WParam, Msg.LParam);
    end;
end;

Constructor TSong.Create(AOwner: TComponent);
begin
    inherited Create(AOwner);
    FHWnd := AllocateHWnd(WndMethod); //* And use FHWnd as the target handle
    ...
end;

Destructor TSong.Destroy;
begin
    DeallocateHWnd(FHWnd);
end;

Maybe someone will come up with a better solution.

I see you are accessing the TSong class in the callback. This can also result a crash if you are accessing it too in the main process at the same time if you don't use critical section or something to control access.
ReplyReply Reply with quoteQuote
20  Developments / BASS / Re: error getting midi lyrics marks on: 6 Apr '13 - 07:27
That's probably what I wrote: TLabel, TButton, etc. thay are VCL objects.

I usually solve this kind of problem with creating a 'message' object and send this object to to form handle with PostMessage(), which I pass in the user parameter.
Receive the object in the form, use it and free the object.

Something like this:

    BASS_ChannelSetSync(fStream, BASS_SYNC_MIDI_LYRIC, 0, @MIDILyricSync, Self.Handle); //* Self is the TForm which will receive the message

type
    TCallbackMessage = class
        Text: String;
    end;

Const
    MYMSG_BASE = WM_USER * + 100;
    MYMSG_CALLBACK = MYMSG_BASE + 1;

type
    TForm1...
    private
        procedure LyricSyncMessageArrived(var Message: TMessage); message MYMSG_CALLBACK; // Add this to the form's private section
        ...

procedure TForm1.LyricSyncMessageArrived(var Message: TMessage); // Add this procedure to the form
var
    Data: TCallbackMessage;
begin
    Data := TCallbackMessage(Message.WParam);
    try
        Label.Caption := Data.Text;
    finally
        FreeAndNil(Data);
    end;
end;

procedure LyricSync(Handle : HSYNC; Stream : HSTREAM; data, user : DWORD); stdcall;
var
  Mark  : BASS_MIDI_MARK;
  var i: integer;
  Text: String;
  Data: TCallbackMessage;
begin
  i := 0;
    while BASS_MIDI_StreamGetMark(Stream, BASS_SYNC_MIDI_LYRIC, i, Mark) do
    begin
      Text := concat(Text, Mark.text);
      inc(i);
    end;

    Data := TCallbackMessage.Create;
    Data.Text := Text;
    PostMessage(User, MYMSG_CALLBACK, WParam(Pointer(Data)), 0);

end; {LyricSync}


When passing simple data a simple GetMem() FreeMem can be used instead of a class.
ReplyReply Reply with quoteQuote
Pages: [1] 2 3 ... 32
Powered by SMF 1.1.18 | SMF © 2013, Simple Machines