Problems with Multiinput UOS example.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with Multiinput UOS example.

darekdarek
I have a problem with the Multiinput.lpi example (from the Examples directory).
Except for the malfunctioning buttons: Load, Play All Together and Stop, not all files in the example are played.

Additionally, I have 2 questions:
- Is it possible to play several sounds simultaneously in one Player in Mp3 format (using LibMpg123-32.dll)?
- How to control which file (in case of several files loaded into one Player with different InputIndex) is currently played?

DB
Reply | Threaded
Open this post in threaded view
|

Re: Problems with Multiinput UOS example.

fredvs
Administrator
Hello and welcome to uos forum.

>  have a problem with the Multiinput.lpi example (from the Examples directory).

I just try it now and all the input are playing.
Note that in that demo, only libsndfile is loaded (to play wav, ogg, flac files).

> - Is it possible to play several sounds simultaneously in one Player in Mp3 format (using LibMpg123-32.dll)?

If you want to play mp3, you need to load also libmpg123 library.
It is done in  line 312 of main_mi.pas  with : uos_loadlib():

 //function  uos_loadlib(PortAudioFileName, SndFileFileName, Mpg123FileName,
  // Mp4ffFileName, FaadFileName, opusfilefilename: PChar) : LongInt;

So in line 312, you should change 3th parameter with the dir+filename of lib mpg123:

  if uos_LoadLib(PChar(edit1.Text), PChar(edit2.Text),  PChar(filename_libmpg123), nil, nil, nil) = 0 then

> - How to control which file (in case of several files loaded into one Player with different InputIndex) is currently played?

Please take a look at multiinput demo, there is the volume-slider and checkbox enable-disable.

Fre;D



Reply | Threaded
Open this post in threaded view
|

Re: Problems with Multiinput UOS example.

fredvs
Administrator
This post was updated on .
In reply to this post by darekdarek
Hello.

Indeed, after deeper check there was problems with mp3 as multi input.

In last commit a6a4260 of uos, fixed MultiInput demo and added input for mp3 format.
Multi-input works for mp3 files if all the input are mp3 (no mix with ogg or wav).

There is a checkbox "MP3 Input files" to enable if you want multi-input of mp3.

Thanks to note it.

[EDIT]

> > - How to control which file (in case of several files loaded into one Player with different InputIndex) is currently played?

Please take a look at multiinput demo, there is the volume-slider and checkbox enable-disable.
You may also add how many control you want for each input.
Please check the "SimplePlayer" demo, there are some controls for the (unique) input that you may apply to each input of the multi-input demo

Fre;D