19 May '13 - 11:55 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Newbie Questions  (Read 338 times)
binfch
Posts: 1


« on: 24 Apr '12 - 18:25 »
Reply with quoteQuote

Hi there

I am interested in purchasing a license but need to make sure there is no deadend.

I have a freepascal application (linux) that deals with short SPEEX sounds (+/- 5 seconds long).

1) The Speex format seems to be supported, right?
2) I have the raw Speex sound data in the memory (in a stream) and I need to check:
  a) The length of the sound (number of seconds long).
  b) Check if there is only silence in the sound or not.
  c) Trim silences (from both ends) from the sound.
3) Preferably I'd like to do all these tasks in the memory.

Would this possible with the library?

Thanks & cheers,
P.
Logged
Ian @ un4seen
Administrator
Posts: 15244


« Reply #1 on: 25 Apr '12 - 16:00 »
Reply with quoteQuote

I think it should be possible to achieve what you want with BASS and the BASS_SPX add-on. You can pass your memory block to BASS_SPX_StreamCreateFile with the "mem" paramater set to TRUE. As you want to process the file without playing it, you would also use the BASS_STREAM_DECODE flag in the call. You can then use BASS_ChannelGetData to get decoded sample data from the file, eg. to check where the sound begins/ends in it. Here's some code that you could use as the basis for your silence detection...

   www.un4seen.com/forum/?topic=784.msg4164#msg4164

Note that thread is old, and some things have since changed, eg. BASS_StreamGetLength is now BASS_ChannelGetLength (you would also add the BASS_POS_BYTE "mode" to it).
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines