19 May '13 - 18: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: wasapi and BASS_WASAPI_FORMAT_16BIT  (Read 385 times)
tomas.knoll
Posts: 10


« on: 18 May '12 - 09:36 »
Reply with quoteQuote

hello,
i am experiment with WASAPI... it use it together with BASS. (at delphi)
When i use BASS_SAMPLE_FLOAT for bass and  BASS_WASAPI_FORMAT_FLOAT for basswasapi...
it is working wery well.
but my data arent float, but 16bit integer.
I need initialize wasapi at 16bit sample.

for setting flag i try...
  flag_wasapi :=  MakeLong( BASS_WASAPI_EXCLUSIVE, BASS_WASAPI_FORMAT_16BIT );
  flag_bass= 0; // zero is 16bit ...
When i use this setting, i hear terrible sound...

It is possible to use bass and wasapi at 16bit mode  ?

Thank you, Tomas

Logged
Ian @ un4seen
Administrator
Posts: 15244


« Reply #1 on: 18 May '12 - 14:51 »
Reply with quoteQuote

When a sample format (eg. BASS_WASAPI_FORMAT_16BIT) is specified in a BASS_WASAPI_Init call, that is used to set the device's format, but the user's sample data is always expected to be floating-point.

Are you using a mixer to feed your WASAPIPROC function? If so, you can make the mixer produce floating-point output by using the BASS_SAMPLE_FLOAT flag in the BASS_Mixer_StreamCreate call. If you have some 16-bit sample data that you want to play, you can create a 16-bit stream for it (via BASS_StreamCreate) and plug that into the mixer, and the mixer will convert it to floating-point.
Logged
tomas.knoll
Posts: 10


« Reply #2 on: 22 May '12 - 12:19 »
Reply with quoteQuote

thank you,
yes I am using output mixer. It was my mistake to all streams initialize with same parameters..

All my escapade with wasapi is to enable microphone sidetone (hearing own microphone on windows 7)  with no latency,

If there is another way, how to do it, please tell me.

Thomas
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines