Author Topic: Sound Blaster Direct Mode. No sound.  (Read 293 times)

DeepDigger

  • Posts: 21
Sound Blaster Direct Mode. No sound.
« on: 22 Oct '22 - 11:16 »
I've got no any Creative Sound Blaster with Direct Mode. And can't debug a report of my program user about this sad subject.

My program successfully does as follow:
 ...
 BASS_Init(DeviceIndex,44100,BASS_DEVICE_DSOUND,Application.handle,nil);
 ...
 SomeHandle:=BASS_StreamCreateFile(...,...,0,...,BASS_SAMPLE_3D or BASS_STREAM_AUTOFREE or BASS_SAMPLE_SOFTWARE or BASS_SAMPLE_FLOAT);
 ...
 BASS_ChannelPlay(SomeHandle,false);

But doesn't support Creative Sound Blaster Direct Mode.  :(

Any clue?

Thank you.

Chris

  • Posts: 2104
Re: Sound Blaster Direct Mode. No sound.
« Reply #1 on: 22 Oct '22 - 17:17 »
Hi just place a simple Bass_ErrorGetCode Call after every call so something like this

 
Code: [Select]
if not BASS_Init(DeviceIndex,44100,BASS_DEVICE_DSOUND,Form1.handle,nil) then
 ShowMessage(Bass_ErrorGetCode().tostring)
else
begin
SomeHandle:=BASS_StreamCreateFile(...,...,0,...,BASS_SAMPLE_3D or BASS_STREAM_AUTOFREE or BASS_SAMPLE_SOFTWARE or BASS_SAMPLE_FLOAT);
if somehandle = 0 then // error
 ShowMessage(Bass_ErrorGetCode().tostring)

end;

by the way what do you wanna to play a 3D Sample?

DeepDigger

  • Posts: 21
Re: Sound Blaster Direct Mode. No sound.
« Reply #2 on: 22 Oct '22 - 20:10 »
My game-like application puts mono sound into a random point of soundscape.

Well, Sound Blaster Direct Mode user reports about BASS_ERROR_DRIVER - can't find a free sound driver.
Nevertheless BASS resolves the DeviceIndex as Sound Blaster AE-7.
 ???
 ::)
« Last Edit: 23 Oct '22 - 09:35 by DeepDigger »

Ian @ un4seen

  • Administrator
  • Posts: 24792
Re: Sound Blaster Direct Mode. No sound.
« Reply #3 on: 24 Oct '22 - 12:23 »
It looks like by "Direct Mode" you mean DirectSound, ie. using the BASS_DEVICE_DSOUND flag in your BASS_Init call? Is the same device working properly if you just remove the BASS_DEVICE_DSOUND flag?

Please also confirm what BASS and Windows versions are being used. You can use BASS_GetVersion to check the BASS version (it should return 0x02041100 for 2.4.17.0).

DeepDigger

  • Posts: 21
Re: Sound Blaster Direct Mode. No sound.
« Reply #4 on: 24 Oct '22 - 17:23 »
Yes, Sir. There's the latest version of BASS in use.

I mean exactly the Direct Mode of Sound Blaster AE-7.
That device doesn't sound only if its Direct Mode toggleswitch is on.
No matter whether BASS_DEVICE_DSOUND flag used or not.
BASS_Init returns BASS_ERROR_DRIVER.
And BASS_GetDeviceInfo returns Name='Speakers (Sound Blaster AE-7)'.
Other sound applications work properly in this mode.

At least an user of my application reports so.

Chris

  • Posts: 2104
Re: Sound Blaster Direct Mode. No sound.
« Reply #5 on: 24 Oct '22 - 20:31 »
So far i know the Direct Mode turns off all internal DSP Effects of the Creative Soundcard and have nothing to do  with DirectSound or WasApi.
so with DirectMode off it will work?

Chris

  • Posts: 2104
Re: Sound Blaster Direct Mode. No sound.
« Reply #6 on: 25 Oct '22 - 05:43 »
So far i know the Direct Mode turns off all internal DSP Effects of the Creative Soundcard and have nothing to do  with DirectSound or WasApi.
so with DirectMode off it will work?
which operating system ?

Ian @ un4seen

  • Administrator
  • Posts: 24792
Re: Sound Blaster Direct Mode. No sound.
« Reply #7 on: 25 Oct '22 - 12:55 »
I mean exactly the Direct Mode of Sound Blaster AE-7.
That device doesn't sound only if its Direct Mode toggleswitch is on.
No matter whether BASS_DEVICE_DSOUND flag used or not.
BASS_Init returns BASS_ERROR_DRIVER.
And BASS_GetDeviceInfo returns Name='Speakers (Sound Blaster AE-7)'.
Other sound applications work properly in this mode.

At least an user of my application reports so.

Oh, I see. That is strange then. So BASS_Init fails with a BASS_ERROR_DRIVER error, with and without using the BASS_DEVICE_DSOUND flag? I haven't tried the "Direct Mode" of Sound Blaster AE-7 myself, but it seems like it just disables the device's sound processing. That shouldn't affect initialization, so I'm not sure how/why it would in your user's case. Please send them the pre-compiled CONTEST.EXE example from the BASS package (C\BIN folder) to see if they can reproduce the problem with that. Ask them to try the "Default" device, and the "Sound Blaster AE-7" device via the "-d" option (use the "-l" option first to get the device number).

DeepDigger

  • Posts: 21
Re: Sound Blaster Direct Mode. No sound.
« Reply #8 on: 25 Oct '22 - 21:09 »
Thank you so much, Ian!!!
Now I am convinced of the "You shall not initialize DirectSound"  ;)
Still and all, BASS_DEVICE_DSOUND flag in BASS_Init was overlooked. :'(