21 May '13 - 01:58 *
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
1  Developments / BASS / Re: NormalizeDSP not work flag BASS_SAMPLE_FLOAT ?? on: 25 May '12 - 08:42
I'm not a Delphi user myself, so I'm not entirely sure what it should look like there, but perhaps something like this...

procedure NormalizeDSP(Handle: HDSP; Channel: DWORD; Data: Pointer; Length: DWORD; user: Pointer); Stdcall;
var
  Peak: Float;
  d: ^Float;
  i: Integer;
begin
  Peak := Float(user);
...
thank
Salvo
ReplyReply Reply with quoteQuote
2  Developments / BASS / Re: NormalizeDSP not work flag BASS_SAMPLE_FLOAT ?? on: 23 May '12 - 18:49
I did not understand your answer.
You can make a correct example or give me a piece of working code?
Salvo
ReplyReply Reply with quoteQuote
3  Developments / BASS / NormalizeDSP not work flag BASS_SAMPLE_FLOAT ?? on: 23 May '12 - 16:55
Quote
function TfEncode.GetPeak(Channel: DWORD): Float;
var
  i, d: Integer;
  Peak:Float;
  buf: Array[0..50000] of Float;
begin
  Peak:= 0;
  while   (BASS_ChannelIsActive(Channel) <> 0) do begin
    d:= BASS_ChannelGetData(Channel, @buf, SizeOf(buf));
    d:= d div 4;
    for   i:= 0 to d-1 do
      if (peak < Abs(buf)) then peak:= Abs(buf);
  end;
  Result:= Peak;
end;

procedure NormalizeDSP(Handle: HDSP; Channel: DWORD; Data: Pointer; Length: DWORD; Peak: DWORD); Stdcall;
var
  d: ^Float;
  i: Integer;
begin
  d := Data;
  for i := 0 to (Length div 4) -1 do begin
    d^ := d^ / peak;
    Inc(d);
  end;
end;

...
//This code is for 32-Bit Floating Point:
{ Main - ScanPeak for normalize: }
EnChan:= BASS_StreamCreateFile(False, PChar('temp.mp3'), 0, 0, (BASS_SAMPLE_FLOAT or BASS_STREAM_DECODE));
Peak:= GetPeak(EnChan);

BASS_ChannelSetPosition(EnChan, 0, BASS_POS_BYTE);
Normdsp:= BASS_ChannelSetDSP(EnChan, @NormalizeDSP, Pointer(Peak), 0);
EncHandle:= BASS_Encode_Start(EnChan, PChar(CmdStr), (BASS_ENCODE_FP_32BIT or BASS_ENCODE_AUTOFREE), nil, nil);
BASS_ChannelPlay(EnChan, False);
while BASS_ChannelIsActive(EnChan) <> 0 do begin
  Bytes:= BASS_ChannelGetData(EnChan, @Buf, SizeOf(Buf));
  Progress.Position:= ((100 * BASS_ChannelGetPosition(EnChan, BASS_POS_BYTE)) div BASS_ChannelGetLength(EnChan, BASS_POS_BYTE));
  Application.ProcessMessages;
end;
BASS_ChannelRemoveDSP(EnChan, Normdsp);
BASS_StreamFree(EnChan);



is not work, why ??
Thank
Salvo
ReplyReply Reply with quoteQuote
4  Developments / BASS / Re: Help me Asio !!!! on: 20 May '12 - 12:16
ok found the solution looking for other posts.
ReplyReply Reply with quoteQuote
5  Developments / BASS / Help me Asio !!!! on: 19 May '12 - 18:43
because I can not feel together 2 mp3 files, I have 2 separate channels to mix 2 mp3 files.
 This is the code that does not work.
 Why?

-------------------------------------------
function AsioProc1(input: BOOL; Channel: DWORD; buffer: Pointer; Length: DWORD; user: Pointer): DWORD; stdcall;
var
  c: DWORD;
begin
  c := Bass_ChannelGetData(DWORD(User), buffer, Length);
  if (c = -1) then
    c := 0;
  Result := c;
end;
function AsioProc2(input: BOOL; Channel: DWORD; buffer: Pointer; Length: DWORD; user: Pointer): DWORD; stdcall;
var
  c: DWORD;
begin
  c := Bass_ChannelGetData(DWORD(User), buffer, Length);
  if (c = -1) then
    c := 0;
  Result := c;
end;

.............................................

BASS_Init(0, 44100, 0, 0, nil);
BASS_ASIO_Init(0,0);

BASS_ASIO_ChannelEnable(False, 0, @AsioProc1, Pointer(0));
BASS_ASIO_ChannelJoin(false, 1, 0);
BASS_ASIO_ChannelSetFormat(False, 0, BASS_ASIO_FORMAT_Float);
BASS_ASIO_ChannelPause(false, 0);

BASS_ASIO_ChannelEnable(False, 2, @AsioProc2, Pointer(2));
BASS_ASIO_ChannelJoin(false, 3, 2);
BASS_ASIO_ChannelSetFormat(False, 2, BASS_ASIO_FORMAT_Float);
BASS_ASIO_ChannelPause(false, 2);

BASS_ASIO_Start(0);



chan := BASS_StreamCreateFile(false, PChar('Test1.mp3'), 0, 0,BASS_SAMPLE_FLOAT or BASS_STREAM_DECODE or BASS_UNICODE or BASS_SAMPLE_LOOP);
chan := BASS_FX_TempoCreate(chan, BASS_FX_FREESOURCE or BASS_STREAM_DECODE);

chan2 := BASS_StreamCreateFile(false, PChar('Test2.mp3'), 0, 0,BASS_SAMPLE_FLOAT or BASS_STREAM_DECODE or BASS_UNICODE or BASS_SAMPLE_LOOP);
chan2 := BASS_FX_TempoCreate(chan2, BASS_FX_FREESOURCE or BASS_STREAM_DECODE);

BASS_ASIO_ChannelEnable(False, 0, @AsioProc1, Pointer(chan));
Bass_Asio_ChannelReset(false,0, BASS_ASIO_RESET_PAUSE);


BASS_ASIO_ChannelEnable(False, 2, @AsioProc2, Pointer(chan2));
Bass_Asio_ChannelReset(false,2, BASS_ASIO_RESET_PAUSE);

............................
ReplyReply Reply with quoteQuote
6  Developments / BASS / Re: Error !!!! on: 10 Mar '11 - 14:57
No, it does so only with memory
BASS_StreamCreateFile (True, MemChan.memory ............);
AND BASS_SAMPLE_FLOAT
AND strs[strc]:= BASS_FX_TempoCreate(strs[strc], BASS_FX_FREESOURCE);

sorry I sent you the example you have done??
It'll be the problem.
Test.
ReplyReply Reply with quoteQuote
7  Developments / BASS / Re: Error !!!! on: 1 Mar '11 - 17:24
I expressed myself badly.
Just remove the line
-->>>> // strs[strc]:= BASS_FX_TempoCreate(strs[strc], BASS_FX_FREESOURCE);
or
simply remove the option BASS_SAMPLE_FLOAT from the following line
strs[strc]:= BASS_StreamCreateFile(True, MemChan.memory, 0, MemChan.size, BASS_STREAM_DECODE or  (*BASS_SAMPLE_FLOAT or*) BASS_SAMPLE_LOOP);
it works.
ReplyReply Reply with quoteQuote
8  Developments / BASS / Re: Error !!!! on: 28 Feb '11 - 16:37
Found guilty.
By inserting the coding FX_ and BASS_SAMPLE_FLOAT by the error.
Removing BASS_SAMPLE_FLOAT, and leaving FX_ it works.
But what the reason for the error?
Why only on this file?
ReplyReply Reply with quoteQuote
9  Developments / BASS / Error !!!! on: 28 Feb '11 - 16:20
Error executing the base attached, and if you take away the FX encoding it works.
Why?
Attachment:
http://www.euroazienda2000.it/basstest.zip

Thanks for the help.
ReplyReply Reply with quoteQuote
10  Developments / BASS / Re: Help me. on: 7 Dec '10 - 14:41
By moving the trackbar forward or back, there appears to be a mismatch of the audio video sync.
It seems that the remains date to the buffer, that buffer does not empty completely.
How do I clear the buffer??
ReplyReply Reply with quoteQuote
11  Developments / BASS / Re: The audio skips jams!!!! on: 3 Dec '10 - 08:02
Yes I have a problem when playing the file OH_DIANA alone with mp3-free.

That's strange. Can you reproduce the problem with the pre-compiled CONTEST.EXE example in the C\BIN directory? If so, at what position(s) does it occur?
Tried today and I do not know why but now it's working.
Anyway thanks for the help.
Hi
ReplyReply Reply with quoteQuote
12  Developments / BASS / Re: The audio skips jams!!!! on: 2 Dec '10 - 15:48
Yes I have a problem when playing the file OH_DIANA alone with mp3-free.

That's strange. Can you reproduce the problem with the pre-compiled CONTEST.EXE example in the C\BIN directory? If so, at what position(s) does it occur?
However the problem is not the skip or breaks on file OH_DIANA, but the speed is reduced to 20% of the time.
He plays in slow motion.
ReplyReply Reply with quoteQuote
13  Developments / BASS / Re: The audio skips jams!!!! on: 2 Dec '10 - 15:35
Ok. I'll let you know.
ReplyReply Reply with quoteQuote
14  Developments / BASS / Re: The audio skips jams!!!! on: 2 Dec '10 - 14:28
It was 2.4.6.
With 2.4.7 it works:
Quote
# Define BASS_CONFIG_MP3_ERRORS 35
BASS_SetConfig (BASS_CONFIG_MP3_ERRORS, 1);

Yes I have a problem when playing the file OH_DIANA alone with mp3-free.

I do not use BASS_MIDI but I use a routine to load the midi file to be sent to VSTi BASS_VST to use.
Thank
Salvo
ReplyReply Reply with quoteQuote
15  Developments / BASS / Re: The audio skips jams!!!! on: 2 Dec '10 - 12:33
None of this applies to the "mp3-free" BASS version.
Yes, it works, but there are too many files that do not work.
With WMP works, but with free mp3-no.
Type this:
http://www.euroazienda2000.it/OH_DIANA.ZIP
I hope you will find the error quickly, because there are too many files that do not work.
Hi
ReplyReply Reply with quoteQuote
16  Developments / BASS / Re: The audio skips jams!!!! on: 2 Dec '10 - 09:22

#define BASS_CONFIG_MP3_ERRORS 35
BASS_SetConfig(BASS_CONFIG_MP3_ERRORS, 1);
Even if I disable the errors, always breaks or skips in the sound output.
ReplyReply Reply with quoteQuote
17  Developments / BASS / Re: The audio skips jams!!!! on: 2 Dec '10 - 08:22
I noticed that you also have problems very little breaks or skips in the sound output on the MIDI files on some computers with the module VSTi.
The problem I can not play it because it does not always but occasionally.
And I do not know if this is related to the previous problem.
If you can help this problem originated with the Library 2.4, with 2.3 and worked fine.
Hi
ReplyReply Reply with quoteQuote
18  Developments / BASS / Re: The audio skips jams!!!! on: 1 Dec '10 - 15:22
Then I tried this with windows media player is basic functions, tested with Basstest 2.4.7 skips on windows 7 64bit.
the song you can download it from:
http://www.euroazienda2000.it/valerio.zip
Thanks
ReplyReply Reply with quoteQuote
19  Developments / BASS / Re: Help me. on: 28 Nov '10 - 13:16

Should look like this:

Quote
CanaleVideo2.Chan1:= BASS_StreamCreate(freq, 2, BASS_STREAM_DECODE ,STREAMPROC_PUSH,nil);

CanaleVideo2.Chan2:= BASS_FX_TempoCreate(CanaleVideo2.Chan1, BASS_FX_FREESOURCE);

.................
procedure TFORM1.AudioBuffer(Sender: TObject; Buf: Pointer; cbData: Integer);
begin
    BASS_StreamPutData(CanaleVideo2.Chan1, Buf, cbData); //put master audio output in to stream
   
end;

 BASS_ChannelPlay(CanaleVideo2.Chan2, false); //play the stream




Yes, it works.
Thanks
ReplyReply Reply with quoteQuote
20  Developments / BASS / Re: Help me. on: 28 Nov '10 - 10:14
nobody knows how to do??
ReplyReply Reply with quoteQuote
Pages: [1] 2 3
Powered by SMF 1.1.18 | SMF © 2013, Simple Machines