Author Topic: no sound when play the radio  (Read 234 times)

terry_zhou82

  • Posts: 64
no sound when play the radio
« on: 3 Jan '21 - 04:06 »
I've a stranger question. when I play the radiostation, the status is "play",but no sound from the headphone?
I checked the bassinit like this is OK
BASS_Init(-1, 44100, 0, 0, nil)
I run the app on another notebook computer, it's work.
Can u help me or tell me where's the problem?
Tks.

Ian @ un4seen

  • Administrator
  • Posts: 23288
Re: no sound when play the radio
« Reply #1 on: 4 Jan '21 - 15:07 »
Are you having the problem with a specific URL or all URLs? Please try playing the same URL(s) with the pre-compiled NETRADIO.EXE example included in BASS package (C\BIN folder). If that's silent too, are the URL(s) playing OK with other software on the same computer?

terry_zhou82

  • Posts: 64
Re: no sound when play the radio
« Reply #2 on: 4 Jan '21 - 15:46 »
dear un4seen
first,the url is ok,I use the following code to list all the output device, and select the default device
var
  info: BASS_DEVICEINFO;
  i: Integer;
begin

ListBox1.Clear ;
i := 1;
  while BASS_GetDeviceInfo(i, info) do
  begin
    ListBox1.Items.Add(string(info.name));
    Inc(i);
  end;
end;

 BASS_Init(-1, 44100, 0, 0, nil) //default device.

//and use this code to show the status, it shows playing.
case BASS_ChannelIsActive(chan) of
    BASS_ACTIVE_STOPPED:str:= 'stop ';
    BASS_ACTIVE_PLAYING:str:= 'playing: ';
    BASS_ACTIVE_STALLED:str:= 'buffering';
    BASS_ACTIVE_PAUSED:str:= 'pause ';
  end;

the same code run ok in win7.and other notebook, but it only doesn't work on my laptop computer.
maybe some compatibility with the new win10?

Ian @ un4seen

  • Administrator
  • Posts: 23288
Re: no sound when play the radio
« Reply #3 on: 4 Jan '21 - 16:09 »
If the problem is happening with a specific URL then please post it to have a look at. Also try playing the URL with the pre-compiled NETRADIO.EXE example and other (non-BASS) software on the same laptop, to check if the problem is something specific to your app or BASS.

terry_zhou82

  • Posts: 64
Re: no sound when play the radio
« Reply #4 on: 5 Jan '21 - 13:48 »
I CHANGE THE BASS.DLL from 2.4.15---->2.4.11,
IT'S WORK BUT I found it has 0.5sec delay,and don't know how to do :'(

Ian @ un4seen

  • Administrator
  • Posts: 23288
Re: no sound when play the radio
« Reply #5 on: 5 Jan '21 - 14:36 »
Please give the URL that you're having the problem with. If you don't want to share it publicly, you can send it in a personal message.

adammalecki

  • Posts: 2
Re: no sound when play the radio
« Reply #6 on: 5 Jan '21 - 21:28 »
I have a similar problem.
This stream is not working:
https://stream.rcs.revma.com/ye5kghkgcm0uv
 
The program compiles, but hangs and does not respond.
The program is written correctly because it works very well on these streams:
http://stream.rcs.revma.com/ypqt40u0x1zuv
https://stream.nowyswiat.online/mp3
Could someone check what is wrong with this first stream?

terry_zhou82

  • Posts: 64
Re: no sound when play the radio
« Reply #7 on: 6 Jan '21 - 12:37 »
@un4seen, It must not the problem of the url. because I select all the url is the same statues.

Ian @ un4seen

  • Administrator
  • Posts: 23288
Re: no sound when play the radio
« Reply #8 on: 6 Jan '21 - 14:03 »
I have a similar problem.
This stream is not working:
https://stream.rcs.revma.com/ye5kghkgcm0uv
 
The program compiles, but hangs and does not respond.
The program is written correctly because it works very well on these streams:
http://stream.rcs.revma.com/ypqt40u0x1zuv
https://stream.nowyswiat.online/mp3
Could someone check what is wrong with this first stream?

The troublesome URL is HE-AAC while the other 2 are MP3, so I suspect you're running into the Media Foundation streaming issue that was introduced in the Windows 20H1 update (see this thread). A fix has been added for the next BASS release, which should be coming fairly soon. In the meantime, here's the latest build for you to try:

   www.un4seen.com/stuff/bass.zip

Let me know if you still have the problem with that.

@un4seen, It must not the problem of the url. because I select all the url is the same statues.

OK. If the problem goes away when you switch to an old BASS.DLL version then perhaps it's related to WASAPI output (which was introduced in 2.4.13). Please try using the BASS_DEVICE_DSOUND flag in your BASS_Init call and see if the problem still happens then.

adammalecki

  • Posts: 2
Re: no sound when play the radio
« Reply #9 on: 6 Jan '21 - 23:55 »
@ un4seen.
Thanks a lot.
On the library version you indicated.
It worked right away!
greetings...

terry_zhou82

  • Posts: 64
Re: no sound when play the radio
« Reply #10 on: 7 Jan '21 - 13:36 »
un4seen
//I use this code
BASS_Init(-1, 44100, BASS_DEVICE_DSOUND, 0, nil)
[dcc32 Error] main.pas(3679): E2003 Undeclared identifier: 'BASS_DEVICE_DSOUND'

I copy bass.dll(2.4.15),and bass.pas in the directory

win10 20H2

Ian @ un4seen

  • Administrator
  • Posts: 23288
Re: no sound when play the radio
« Reply #11 on: 7 Jan '21 - 17:02 »
I just checked the BASS.PAS file, and BASS_DEVICE_DSOUND is definitely defined in there:

Code: [Select]
  BASS_DEVICE_DSOUND      = $40000; // use DirectSound output

Are you sure you put the BASS.PAS file in the correct folder, where Delphi can find it? If so, perhaps you also have an older BASS.PAS version in another folder that Delphi looks in first?

terry_zhou82

  • Posts: 64
Re: no sound when play the radio
« Reply #12 on: 8 Jan '21 - 12:14 »
OK,I got bass.dll(2.4.15),bass.pas in the directory
But the sound is broken!!!
 BASS_Init(-1, 44100, BASS_DEVICE_DSOUND, 0, nil)

terry_zhou82

  • Posts: 64
Re: no sound when play the radio
« Reply #13 on: 8 Jan '21 - 12:17 »
or,if I use the bass.dll(2.4.12)
It's silence again...

Ian @ un4seen

  • Administrator
  • Posts: 23288
Re: no sound when play the radio
« Reply #14 on: 8 Jan '21 - 16:25 »
That sounds like it isn't related to WASAPI vs DirectSound then. Do you have the problem any of the preset URLs in the pre-compiled NETRADIO.EXE example that's included in the BASS package? If not, please post a URL that is affected.

terry_zhou82

  • Posts: 64
Re: no sound when play the radio
« Reply #15 on: 9 Jan '21 - 05:05 »
url:http://live-radio02.mediahubaustralia.com/4LRW/mp3/;
I played well in NETRADIO.EXE example.
but in my program bass.dll(2.4.12) the status shows"play",but no sound.
Is it related with the WIN10 2H version ?

terry_zhou82

  • Posts: 64
Re: no sound when play the radio
« Reply #16 on: 9 Jan '21 - 13:57 »
It's solved.I found the problem for I just seconfig the buffering value...
So It's the broken.Now it normal,Thank you un4seen :-*