Android Question Media player limit ? - SOLVED

saunwin

Active Member
Licensed User
Longtime User
Hi All,
I have a shooting game. The guns (external) each contain a radio. The radio sends one byte at a time, the bytes are "make a bang" sound and "make a smash" sound (if the target is hit). One of the bits in these bytes is battery good/bad. There are five guns (so ten unique bytes).

I have a receiver sending the received gun bytes to the OTG socket of a tablet.

I have 10 media players in the tablet (because ALL the guns can fire at once - the radios (nrf24l01) sort out OTA data clashes).

If I fire 3 guns (not at the same time), (all hitting the target I get 3 bangs and 3 crashes. The fourth gun goes bang, but no crash and the fifth gun doesn't produce a bang or a clash.
I know bytes are entering the tablet because the battery bit is working correctly.

Is there a limit of 7 mediaplayers active at one time ? if so is there a solution ?

Thanks in advance.
 

saunwin

Active Member
Licensed User
Longtime User
OK - I've fixed this - I use 2 media players (bang and crash). When a bang is received and bang (from another gun) is already playing. I stop the mediaplayer, reload it and restart it, same with the crash.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…