Recent

Author Topic: [SOLVED] Issue with TPlaySound on a Raspberry pi  (Read 2528 times)

Barry55

  • New Member
  • *
  • Posts: 20
[SOLVED] Issue with TPlaySound on a Raspberry pi
« on: January 11, 2021, 07:26:03 pm »
I am trying to use TPlaysound on a Raspberry pi using Lazarus and Free pascal. Its installed fine but when I try and play a mp3 or wav file I just get a crazy loud hissing sound from the the speakers. I tried the demo app with the installation and its the same, so I don;t think its my code perhaps something environmental. both of the files I have play fine using the VCL player I have installed on the raspberry pi.

Does anyone have any suggestions ?

Many thanks
Barry
« Last Edit: January 12, 2021, 01:27:15 pm by Barry55 »

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Issue with TPlaySound on a Raspberry pi
« Reply #1 on: January 11, 2021, 09:57:19 pm »

Barry55

  • New Member
  • *
  • Posts: 20
Re: Issue with TPlaySound on a Raspberry pi
« Reply #2 on: January 11, 2021, 10:44:29 pm »
Having read this thread it seems to be mostly about Windows, I am using a Raspberry Pi or using Bass. Before I switch to something else I wondered if anyone knew the answer on Tplaysound

Thanks
Regards

Barry

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Issue with TPlaySound on a Raspberry pi
« Reply #3 on: January 12, 2021, 01:00:23 am »
Tplaysound takes a different approach to playing sound cross-platform: for Linux it searches the system for programs which will play sound and chooses the first it comes across. You could try changing the order in which it searches to use a different program.

Barry55

  • New Member
  • *
  • Posts: 20
Re: Issue with TPlaySound on a Raspberry pi
« Reply #4 on: January 12, 2021, 08:55:11 am »
Thanks for the info, how would I do that ?

Regards

Barry

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Issue with TPlaySound on a Raspberry pi
« Reply #5 on: January 12, 2021, 09:30:48 am »
Please follow the link I provided.

Barry55

  • New Member
  • *
  • Posts: 20
Re: Issue with TPlaySound on a Raspberry pi
« Reply #6 on: January 12, 2021, 01:11:57 pm »
Thank you, having read the post and tested that aplay (which was selected by the control) didn't work from a terminal window, I then manually changed the play command in the properties of Playsound1 to

PlayCommand set as  cvlc -q --play-and-exit

This way if I ever download a new version of TPlaysound I won't have to edit it again

Many thanks for your help

Barry

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Issue with TPlaySound on a Raspberry pi
« Reply #7 on: January 12, 2021, 01:15:54 pm »
Glad it worked out for you and thanks for letting us know it resolved your issue. You could edit your topic title to reflect it has now been by prefixing  [Solved] to it.

Barry55

  • New Member
  • *
  • Posts: 20
Re: [SOLVED] Issue with TPlaySound on a Raspberry pi
« Reply #8 on: January 12, 2021, 01:27:34 pm »
Done and thanks again

 

TinyPortal © 2005-2018