0
Votes
Undo
  1. Samuel Sanchez Avila
  2. PowerBuilder
  3. Tuesday, 12 July 2022 23:26 PM UTC

Hello

Its only a question for knowledge

 

Is there an object to play mp3 records?? There is an object Animation, but it just calls .avi files. 

Maybe in a webbrowser object, i dont know

 

Thanks

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 13 July 2022 13:44 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Samuel;

  Yes, laying MP3's is relatively easy. I have discovered two ways to accomplish this ..

Method1: MMCI (Multimedia Command Interface). You can call the mciSendString MS-Windows API to basically set, query, control, etc any Windows multimedia device for any type of media. You can see an example of this in my CDPlayer App.  http://chrispollach.blogspot.com/2015/08/cdplayer.html. The window class "wn_cdplayer_e" has a method called "of_mci_command" where you can see the actual calls coming through to the MMCI API. Running the debugger on that method will allow you to see the various MMCI commands I used and how they are formatted. The CDplayer controls speakers, volume, CD caddy, skip, replay, etc. Many of these features would also apply to MP3 media files.

The CDplayer App though has a MMCI test window class called "wn_mci_test_bench_e". You can run that test window and type in any MMCI command and see how it responds. For playing MP3's, the MMCI command should be (for example:  “play mp3”). So you can use this test window to get the basics going.

MMCI Command Reference: https://docs.microsoft.com/en-us/windows/win32/multimedia/classifications-of-mci-commands

https://www.khroma.eu/digimedia/htmlhelp/html/hs98.htm

 

Method2: MS-Windows Media Player (this O/S object can be embedded into your PB Apps). I have a wrapper object already set-up in my STD Framework. The Player class is called "vs_ole_media_player_master". You can see a working MM App built around this control that already plays various media (local or across the internet) - including MP3's - in this example App:  http://chrispollach.blogspot.com/2022/03/mm.html

BTW: The STD framework is free & open source, so you are welcome to use any part of it (including example apps) in your implementations.

HTH

Regards ... Chris

 

 

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 13 July 2022 08:54 AM UTC
  2. PowerBuilder
  3. # 1

The 'ultimate suite' has an object (https://www.powerbuilder.eu/powerbuilder-blog/627-building-media-player-with-powerbuilder-ultimate-suite ), but it's not free and you can easily build your own: https://wiki.scn.sap.com/wiki/display/SYBPB/PB+MP3 

regards,

MiguelL

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.