22 May '13 - 22:18 *
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] 4 5 ... 7
41  Developments / BASS / Re: Detect silence new on: 30 Oct '11 - 03:30
hi

You can set a sync!

something like that!
procedure Sync_Pos_End(SyncHandle : HSYNC; Channel, data, user : DWORD); stdcall;
begin
// BASS_ChannelStop(Channel);
end;


 End_Bytes:= BASS_ChannelSeconds2Bytes(FSource_Channel, FPos_End_MS / 1000);  (* get end position in bytes *)
 BASS_ChannelSetSync(FSource_Channel, BASS_SYNC_POS, End_Bytes, @Sync_Pos_End, Pointer(Self));

 BASS_ChannelPlay(FSource_Channel, False)

ReplyReply Reply with quoteQuote
42  Developments / BASS / Re: BASSMIDI & Embarcadero® Delphi® XE Version 15.0 on: 23 Oct '11 - 17:30
fStream := BASS_MIDI_StreamCreateFile(false, PWideChar(FileName), 0, 0, BASS_SAMPLE_LOOP, 0 or BASS_UNICODE);
replace with

fStream := BASS_MIDI_StreamCreateFile(false, PWideChar(FileName), 0, 0, BASS_SAMPLE_LOOP or BASS_UNICODE, 44100);
ReplyReply Reply with quoteQuote
43  Developments / BASS / Need help with Matrix mixing on: 17 Oct '11 - 06:18
Hi
I'm trying to understand  Matrix  mixing (in delphi).
Can you tell me whether it's accurate?
 
const
 (* In = stereo, Out = stereo.  *)
   Matrix1 : array[1..2] of array [1..2] of Single =
   ((1, 0),  // left out = left in
   (0, 1));  // right out = right in


 (* In = stereo, Out = swapped stereo. *)
   Matrix2 : array[1..2] of array [1..2] of Single =
   ((0, 1),  // left out = right in
   (1, 0));  // right out = left in


 (* In = stereo, Out = mono. *)
   Matrix3 : array[1..1] of array [1..2] of Single =
    ((0.5, 0.5)); //mono out = half left + right in


 (* In = stereo, Out = quadraphonic (4 channels). *)
   Matrix4: array[1..4] of array[1..2] of Single =
    ((1, 0),  // left front out = left in
     (0, 1),  // right front out = right in
     (1, 0),  // left rear out = left in
     (0, 1)); // right rear out = right in

   (* in = Stereo out 5.1 *)
   Matrix5: array[1..6] of array[1..2] of Single =
    ((1, 0),  // left front out = left in
     (0, 1),  // right front out = right in
     (1, 0),  // left rear out = left in
     (0, 1),  // right rear out = right in
     (1, 0),  // Center
     (0, 1)); // Sub

  (* in = Stereo out 7.1 *)
  ?
 


 (*
    Mixer:= BASS_Mixer_StreamCreate(44100, 6, Mixer_Flag);

     BASS_Mixer_StreamAddChannel(mixer, channel, BASS_MIXER_MATRIX);
      // add the channel with matrix mixing enabled
     BASS_Mixer_ChannelSetMatrix(channel, @matrix5); // apply the matrix
 *)

ReplyReply Reply with quoteQuote
44  Developments / BASS / Re: How to edit MP4 and AAC tags? on: 14 Sep '11 - 03:09
http://sourceforge.net/projects/audiogenie/
ReplyReply Reply with quoteQuote
45  Developments / BASS / Re: Playback on: 7 Sep '11 - 07:51
 
procedure Sync_Pos_End(SyncHandle : HSYNC; Channel, data, user : DWORD); stdcall;
begin
  // put code to stop the stream
end;


 (* Sync when a channel reaches a position.*)
  if (FPos_Stop > 0) then
   begin
    FTempPos:= BASS_ChannelSeconds2Bytes(FChannel, Trunc(FPos_Stop / 1000));
    FPos_Sync:= BASS_ChannelSetSync(FChannel, BASS_SYNC_POS or BASS_SYNC_MIXTIME, FTempPos, @Sync_Pos_End, Pointer(Self));
   end;
ReplyReply Reply with quoteQuote
46  Developments / BASS / Re: Dynamic loading of Bass_FX, Bass_mix, Bass_enc... on: 30 Aug '11 - 03:56
Hi

@fredvs   I've never used Lazarus / FPC So I have no idea why it does not work Huh


Here is an update for bass Dynamics
ReplyReply Reply with quoteQuote
47  Developments / BASS / Re: Dynamic loading of Bass_FX, Bass_mix, Bass_enc... on: 24 Aug '11 - 22:46
@ Ian
No, I do not mind!  You can do with it what you want! 

have fun  Wink
ReplyReply Reply with quoteQuote
48  Developments / BASS / Re: Dynamic loading of Bass_FX, Bass_mix, Bass_enc... on: 23 Aug '11 - 22:41
 Wink
ReplyReply Reply with quoteQuote
49  Developments / BASS / Re: VBR Bitrate in Mp3 Files on: 12 Jun '11 - 04:34
Delphi
function Get_MP3_Bitrate(Filename : Widestring) : WORD;
const       //  [ Version ] [   Layer    ] [Bitrate index]
MPEG_BIT_RATES: array[1..3] of array[1..3] of array[0..15] of word = ((
      { Version 1, Layer I }
      (0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,0),
      { Version 1, Layer II }
      (0,32,48,56, 64, 80, 96,112,128,160,192,224,256,320,384,0),
      { Version 1, Layer III }
      (0,32,40,48, 56, 64, 80, 96,112,128,160,192,224,256,320,0)),
      { Version 2, Layer I }
      ((0,32,48, 56, 64, 80, 96,112,128,144,160,176,192,224,256,0),
      { Version 2, Layer II }
      (0, 8,16,24, 32, 40, 48, 56, 64, 80, 96, 112,128,144,160,0),
      { Version 2, Layer III }
      (0, 8,16,24, 32, 40, 48, 56, 64, 80, 96, 112,128,144,160,0)),
      { Version 2.5, Layer I }
      ((0,32,48, 56, 64, 80, 96,112,128,144,160,176,192,224,256,0),
      { Version 2.5, Layer II }
      (0, 8,16,24, 32, 40, 48, 56, 64, 80, 96, 112,128,144,160,0),
      { Version 2.5, Layer III }
      (0, 8,16,24, 32, 40, 48, 56, 64, 80, 96, 112,128,144,160,0)
    ));
var
  framehead, fPos: DWORD;
  Version, layer, bitrate_index: DWORD;
  fHandle : integer;
  FileFS : THandleStream;
begin

 fPos := BASS_StreamGetFilePosition(FChannel, BASS_FILEPOS_CURRENT) +
         BASS_StreamGetFilePosition(FChannel, BASS_FILEPOS_START);

  fHandle := CreateFileW(PWideChar(Filename), GENERIC_READ, FILE_SHARE_READ, nil, OPEN_EXISTING, FILE_ATTRIBUTE_ARCHIVE, 0);
 if fHandle =  INVALID_HANDLE_VALUE then
  exit;

   FileFS:= THandleStream.Create(fHandle);
   FileFS.Seek(fpos, soFromBeginning);
   FileFS.Read(framehead, SizeOf(framehead));
   FileFS.Free;

   CloseHandle(fHandle);

   framehead:= ((framehead and $ff) shl 24) or
               ((framehead and $ff00) shl 8) or
               ((framehead and $ff0000) shr 8) or
               ((framehead and $ff000000)shr 24); // reverse byte order
 if ((framehead shr 21) = $7ff) then // got frame sync
  begin
   layer:= (framehead shr 19) and 3;
   version:= (framehead shr 17) and 3;
   bitrate_index:= (framehead shr 12) and 15;
   Result:= MPEG_BIT_RATES[version][layer][bitrate_index];
  end
 else
  Result:= 0;
end;


Example from the Bass Documentation
Get the average bitrate of a file.

float time=BASS_ChannelBytes2Seconds(stream, BASS_ChannelGetLength(stream, BASS_POS_BYTE)); // playback duration
DWORD len=BASS_StreamGetFilePosition(stream, BASS_FILEPOS_END); // file length
DWORD bitrate=(DWORD)(len/(125*time)+0.5); // bitrate (Kbps)
 
ReplyReply Reply with quoteQuote
50  Developments / BASS / Re: Using mixer withour playback (silent mode) on: 5 Jun '11 - 03:19
Use the flag BASS_STREAM_DECODE! Mix the sample data, without playing it.
Look in the Bassmix  Documentation under BASS_Mixer_StreamCreate () and BASS_STREAM_DECODE

// Delphi
var Buff32 : array [0..20000] of Byte;

Chan_Source:= BASS_StreamCreateFile(false, PChar(Filename), 0, 0, BASS_STREAM_DECODE or BASS_SAMPLE_FLOAT);
Chan_Mixer:= BASS_Mixer_StreamCreate(4400, 2, BASS_STREAM_DECODE or BASS_SAMPLE_FLOAT);

(* Add Source Channel to Mixer *)
  if not BASS_Mixer_StreamAddChannelEx(Chan_Mixer, Chan_Source, BASS_MIXER_LIMIT or BASS_MIXER_FILTER or BASS_STREAM_AUTOFREE, 0, 0) then
   begin
     //error
    exit;
   end;



    while (BASS_ChannelIsActive(Chan_Source) <> BASS_ACTIVE_STOPPED) do
      begin
         BytesRead:= BASS_ChannelGetData(Chan_Mixer, @Buff32, SizeOf(Buff32));

        if (BytesRead = -1) then
         begin
            // error
           Break;
         end;

        if (FAbord) then
         begin
            // SendMessage(FWndHandle, WM_RIPPER_UPDATE, WM_RIPPER_ABORT, 0);
           Break;
         end;

        // PercentDone:= ((100 * BASS_ChannelGetPosition(Chan_Source, BASS_POS_BYTE)) div BASS_ChannelGetLength(Chan_Source, BASS_POS_BYTE));
        //SendMessage(FWndHandle, WM_RIPPER_UPDATE, WM_RIPPER_PROGRESS, PercentDone);    (* [0..100]% *)
       end;
     end;


ReplyReply Reply with quoteQuote
51  Developments / BASS / Re: nethradio sample multithreaded in delphi on: 13 Apr '11 - 22:28
http://streamwriter.org/en/
ReplyReply Reply with quoteQuote
52  Developments / BASS / Re: What? MP3 decoder patent expiring soon? on: 14 Mar '11 - 05:13
Hi

I wrote to Thomson and that is the answer.

Quote
I write a sound recording program (PC) that  i want to sell for ~19 $ CA Per copy
i use  lame_enc.dll (http://lame.sf.net) for Encoding!

So my question is,  how much do i have to Pay for the mp3 License

Thomson
Quote
Thank you for contacting mp3 licensing.
The application you describe would fall under our software license agreement.
The mp3 license terms for Thomson and FhG patents and software are:
For patents only (if you use your own or a third party codec, such as LAME):
$0.75 per decoder; or
$2.50 per codec (encode+decode).
Royalties are reported and paid on a calendar quarter basis.
There is an annual minimum royalty (AMR) of $15,000.00 due every Jan. 1, against which the above running royalties are credited during the same calendar year.
If this is too large a sum, we can reduce the AMR to $5,000.00, with double the per unit royalties.
Alternatively, for very low volumes, we also have one-time payment, or “batch” licenses, for either $15,000 or $5,000, with no annual recurring fees, and no time limit in which to sell/distribute a maximum number of licensed units, at twice the per-unit royalty of the above-mentioned AMR licenses. So, for instance, if you took the $15K batch license, for codec units, this would permit you to deploy 3,000 licensed codec units. For the $5K batch license, you would have a license for 500 codec units.
You may offer a limited free trial for codecs, which limit the encoding (i) after a maximum of 20 files, or (ii) after a maximum of 30 days, with the intent of promoting full licensed codec versions.
For Patents + Fraunhofer (FhG) software, the terms are the same, except the codec rate which is $5/unit for the $15k annual minimum, and $10/unit for the $5k annual minimum, and double that if you took a batch license which includes the FhG software.
In order to provide you with a draft license agreement for review, we will need the following information:
- Full name of company (including form of incorporation, e.g. Ltd., Inc., ...);

- Street address of company (registered headquarter);

- State/country of incorporation;

- Name, email address, and title of contact person for this agreement;

- Phone and fax numbers of contact person for this agreement;

- Name and title of corporate officer who will be signing this agreement;

- Suggested effective date, which should be as close to 1st shipment date as possible;

- Past quantities before the Effective Date, if any.

If you send me the answers for the above, I can send you a draft of the appropriate agreement for your review. Please let me know if you have any questions.
 
Thank you, and best regards,



ReplyReply Reply with quoteQuote
53  Developments / BASS / Re: What? MP3 decoder patent expiring soon? on: 12 Mar '11 - 22:05
The problem with the free version is,  European  Windows 7 N comes without Windows Media Player.
and from what I remember the update is about 300 MB 

and the problem with the mp3 encoder (lame_enc.dll) is with it  not solved either.


Quote
If you want to move up to a different N edition of Windows 7, you can use Windows Anytime Upgrade. If you want to move from an N edition of Windows 7 to a non-N edition of Windows 7, you'll need to buy the non-N edition of Windows 7 you want, and perform a clean installation. For more information about installing Windows 7, see Installing and reinstalling Windows 7.



ReplyReply Reply with quoteQuote
54  Developments / BASS / Re: What? MP3 decoder patent expiring soon? on: 12 Mar '11 - 06:24
Hi

I do not know but a solution could be to make an MP3 plugin (bass_mp3.dll) @Ian  Wink
Place the plugin on a server or your website.  Build into your software a function
to automatically download and load BASS_PluginLoad the plugins if needed.

shouldn't you avoid the Royalties?
ReplyReply Reply with quoteQuote
55  Developments / BASS / Re: draw waveform of CD-Audio Track, is it possible? on: 11 Mar '11 - 20:44
Yes, just load basscd.dll as a plugin BASS_PluginLoad()
ReplyReply Reply with quoteQuote
56  Developments / BASS / Re: I need help with cuting files. on: 4 Mar '11 - 07:11
Hi

thanks, it looks like it works! I will test it a little longer.
can you also help me with encoding Progress?

                 (* Set Cut Position *)
                  Start_Bytes:= BASS_ChannelSeconds2Bytes(Chan_Source, Start_Pos_MS / 1000); (* get start position in bytes *)
                  Stop_Bytes:=  BASS_ChannelSeconds2Bytes(Chan_Source, Stop_Pos_MS / 1000);  (* get end position in bytes *)
                  Todo_bytes:=  Stop_Bytes - Start_Bytes;
                  BASS_ChannelSetPosition(Chan_Source, Start_Bytes, BASS_POS_BYTE);


                 if (Start_Bytes > 0) or (Stop_Bytes > 0) then
                  begin
                   while (Todo_bytes <> 0) do
                    begin
                      BytesRead:= BASS_ChannelGetData(Chan_Mixer, @Buff32, Min(Todo_bytes, SizeOf(Buff32)));
                     if (BytesRead = -1) or (FAbord) then
                       Break;

                      Dec(todo_bytes, BytesRead);

                    //  PercentDone:= ((100 * BASS_ChannelGetPosition(Chan_Source, BASS_POS_BYTE)) div BASS_ChannelGetLength(Chan_Source, BASS_POS_BYTE));
                  //    SendMessage(FWndHandle, WM_RIPPER_UPDATE, WM_RIPPER_PROGRESS, PercentDone);    (* [0..100]% *)

                    end;
                  end

thx
ReplyReply Reply with quoteQuote
57  Developments / BASS / I need help with cuting files. on: 2 Mar '11 - 06:11

Hi

Is it possible to set the Start / End position of a File (.mp3) within  BASS_StreamCreateFile() and get the remaining length in byte (minus the Start/End Position)?

Something like this
Chan_Source:= BASS_StreamCreateFile(false, PChar(FSource), Start, End, BASS_STREAM_DECODE);

TotalSamples:= TRunc(BASS_ChannelGetLength(Chan_Source, BASS_POS_BYTE) / 2);
FLAC_Encoder.Encoder_Create(PChar(FDestination), TotalSamples)

I use the DLL encoder like (libFLAC.dll, lame_enc.dll, TTALib.dll, ...) and for some encoders like, libFLAC  I have to set the length in bytes when initializing the encoder. It works great if I convert the whole file, but not if i try to cut file.


thx
ReplyReply Reply with quoteQuote
58  Developments / BASS / Re: Problem with analysing recordbuffer (Delphi) on: 1 Feb '11 - 23:17
http://gaedtke.name/Home/index.html
ReplyReply Reply with quoteQuote
59  Developments / BASS / Re: How to convert MP3 file to WAV with new sample rate? on: 24 Jan '11 - 22:37
BASS_ChannelGetData(Mixer , @Buf, sizeof(buf));
ReplyReply Reply with quoteQuote
60  Developments / BASS / Re: BASS_StreamCreateFile Problem on: 27 Dec '10 - 23:05
if using delphi 2010, try the flag BASS_UNICODE

channel:= BASS_StreamCreateFile(false, PWideChar(Source), 0, 0, BASS_UNICODE);
if channel = 0 then
 begin
  case BASS_ErrorGetCode() of
     BASS_ERROR_ILLPARAM : ; // error
     BASS_ERROR_FILEOPEN : ; // error
     ...
     ...
   end
 end;
ReplyReply Reply with quoteQuote
Pages: 1 2 [3] 4 5 ... 7
Powered by SMF 1.1.18 | SMF © 2013, Simple Machines