[Q] Streaming Audio Problems (NOT the usual complaint) - Motorola Photon 4G

Hey guys, I posted this over at Android Forums and, of course, I should have done so here first. I'm having a problem with the QUALITY of streaming audio, as described below. I'm hoping you guys can find a solution--this is the only thing I don't like about the MoPho
----- BEGIN SNIP -----
Hey, guys, I'm having a strange problem with streaming audio which I'd really appreciate if someone could confirm and perhaps help me troubleshoot. I'm certain this is a MoPho specific issue--I'll explain why below...
BACKGROUND:
I am a "feed provider"--I put a police scanner online through radioreference.com which monitors Indianapolis (Marion Co, Indiana) police agencies' dispatch channels. It's a digital system which is difficult to monitor; it requires an expensive radio, ideally located and programmed correctly. At any given time, from a handful to dozens (or more) people listen online via PC's, Macs, and SmartPhones of all manner and description.
I use the paid version of a free app, Scanner Radio by Gordon Edwards, (which I'm sure many of you use--it's a great app) to enjoy and keep tabs on my feed. A couple of days ago, my audio went to hell on the MoPho. I'm hearing brief, spurious bursts of noise during both periods of silence and during transmissions. These can occur from a few seconds to a minute or more apart. I hear these same problems using Wunder Radio to monitor my feed.
I also hear a different problem when monitoring NOAA weather broadcasts using both apps. It manifests itself a bit differently, but I'm convinced it's the same basic issue. On those broadcasts, it seems that the audio might be playing a very slight bit too slowly, and "catches up" via an intermittent, steady, cyclic, nearly instantaneous "skip". It sounds something like this...
"In Indianlis, at eight PM the temperature was eighty-en degrees, and the relative humidity was seventy-two peent" with no pauses--the audio is continuous.
SOLUTIONS I'VE TRIED:
1. Confirmed problem is MoPho specific by monitoring same sources with same apps on a Galaxy Tab. Everything sounded fine.
2. Changed DNS server and Port Addresses to 0,0,0,0 and 0, respectively. No improvement noted.
3. Factory-reset MoPho. Installed just Scanner Radio Pro. Problem was still present.
4. Have tried wi-fi, 3G, and 4G. Problem exists in all cases.
5. Scanner Radio (free and pro both) have an option to stream via their own built-in player or the native Android media player. Problem exists using both.
CONCLUSION:
If anyone wants to have a go at this, my specific feed can be found in Scanner Radio at Browse, Browse by area, United States, Indiana, Marion County, Marion County Police Dispatch. I'm at a loss--I'm confounded and I hope someone can help me work this out.
----- END SNIP -----
Here's a link to the thread where potential issues have been discussed. I've tried several things, including installing the leaked update (no problems there, thanks guys!) but the problems remain. Many thanks in advance for any help you all can give.
http://androidforums.com/motorola-photon-4g/394721-streaming-audio-problem-please-help.html

It's almost like some sort of a buffering issue...

I do believe I'm "hot on the trail" of this problem... From ScannerCast's configuration and usage page:
"Playback Using RealPlayer Results In Periodic Noise
If you play back a stream created by ScannerCast using any version of RealPlayer, the resulting audio will contain periodic pops, clicks, screeches, and noise. This happens whether you directly listen to a ScannerCast stream, or you listen to a stream created by ScannerCast that's being relayed through a SHOUTcast/Icecast server.
This problem occurs because RealPlayer incorrectly handles the SHOUTcast metadata interval parameter, causing it to attempt to decode the metadata as MP3 audio data. This bug was first reported to the RealPlayer developers in 2005, and applies to any SHOUTcast or Icecast stream that doesn't use the default metadata interval of 16K. Real Networks (the for-profit company that owns RealPlayer) hasn't fixed the bug in all these years, and my attempts to report this problem to the RealPlayer developers, or at least hear their side of the story, received no reply.
While ScannerCast could be changed to use the default metadata interval, that would seriously degrade tag/audio synchronization. I have no plans to change the way ScannerCast works to make it work with a third-rate, broken, media player."
Sound familiar???

tbhausen said:
I do believe I'm "hot on the trail" of this problem... From ScannerCast's configuration and usage page:
"Playback Using RealPlayer Results In Periodic Noise
If you play back a stream created by ScannerCast using any version of RealPlayer, the resulting audio will contain periodic pops, clicks, screeches, and noise. This happens whether you directly listen to a ScannerCast stream, or you listen to a stream created by ScannerCast that's being relayed through a SHOUTcast/Icecast server.
This problem occurs because RealPlayer incorrectly handles the SHOUTcast metadata interval parameter, causing it to attempt to decode the metadata as MP3 audio data. This bug was first reported to the RealPlayer developers in 2005, and applies to any SHOUTcast or Icecast stream that doesn't use the default metadata interval of 16K. Real Networks (the for-profit company that owns RealPlayer) hasn't fixed the bug in all these years, and my attempts to report this problem to the RealPlayer developers, or at least hear their side of the story, received no reply.
While ScannerCast could be changed to use the default metadata interval, that would seriously degrade tag/audio synchronization. I have no plans to change the way ScannerCast works to make it work with a third-rate, broken, media player."
Sound familiar???
Click to expand...
Click to collapse
Why does this affect you? Our default media player isn't RealPlayer. Or you saying that's what you've been using? Sorry...confused, hoping to see you resolve this tho...good luck!

No, but I believe the in app player for Scanner Radio and teh Andriod player as implemented in the MoPho have an identical (or very similar) problem. I won't rest until I get to the bottom of this or my 30 days is up, whichever comes first.

tbhausen said:
No, but I believe the in app player for Scanner Radio and teh Andriod player as implemented in the MoPho have an identical (or very similar) problem. I won't rest until I get to the bottom of this or my 30 days is up, whichever comes first.
Click to expand...
Click to collapse
Ah...gotcha. Have you tried using alternate players then? Seems there's a few that support feeds in the market. Double Twist? Doggcatcher

Bandage said:
Why does this affect you? Our default media player isn't RealPlayer. Or you saying that's what you've been using? Sorry...confused, hoping to see you resolve this tho...good luck!
Click to expand...
Click to collapse
I would also be willing to wager that the stream that is used is Shoutcast...as this was the same problem with the MLB app and moto phones. When you switch the alternate audio for streaming MLB games in app instead of the Shoutcast method the problem goes away.

SOLVED (Workaround)
SOLVED:
Apparently, Motorola phones don't like 16kbps mono audio streams. I set up alternative broadcasting software and changed my feed to 32kbps stereo, and the feed plays well with the in-app (Scanner Radio) player--not so well with the Android player. The feed is now listenable, and I hipe this helps people (even if they hadn't experienced the problem--yet...).

tbhausen said:
SOLVED:
Apparently, Motorola phones don't like 16kbps mono audio streams. I set up alternative broadcasting software and changed my feed to 32kbps stereo, and the feed plays well with the in-app (Scanner Radio) player--not so well with the Android player. The feed is now listenable, and I hipe this helps people (even if they hadn't experienced the problem--yet...).
Click to expand...
Click to collapse
Nice TB...glad you figured it out!!

Related

Streaming audio, using ORB, alternatives....

Simple problem. I have several thousand mp3s at home and want to stream them to my phone so that I have all my songs regardless of my location. Even an 8GB MicroSDHC card will not hold all the songs, so streaming is the next best alternative.
I've tried using ORB, and it's a great idea, but the interface through PIE leaves much to be desired. It's difficult to drive around and click the little links, even on large font. Also there is no easy way to queue songs up without making a playlist prior.
Are there any alternatives to ORB that have a better front-end? It'd be nice to have a touch-friendly scrolling type of "catalog" of my songs, and then stream/queue them when I select them. Doesn't seem so hard.
I even tried creating a home web page with IIS, and that worked to a point, but there's got to be something better.
Thanks!
cpujunky said:
Simple problem. I have several thousand mp3s at home and want to stream them to my phone so that I have all my songs regardless of my location. Even an 8GB MicroSDHC card will not hold all the songs, so streaming is the next best alternative.
I've tried using ORB, and it's a great idea, but the interface through PIE leaves much to be desired. It's difficult to drive around and click the little links, even on large font. Also there is no easy way to queue songs up without making a playlist prior.
Are there any alternatives to ORB that have a better front-end? It'd be nice to have a touch-friendly scrolling type of "catalog" of my songs, and then stream/queue them when I select them. Doesn't seem so hard.
I even tried creating a home web page with IIS, and that worked to a point, but there's got to be something better.
Thanks!
Click to expand...
Click to collapse
I read in one of the other threads that SanDisk has announced a 12GB micro SD available this summer and they speculate that it may be a 16GB by the time it comes out.
I agree 100%...I love ORB but it is way too difficult to navigate.
They really have it all down except the few things you mentioned
Anyone else??
SelectRadio 4.0.2 ?
This prog has such an option, and I do use the program but have not tried it out for that so I do not know how well it works.
Lobster Tunes will do it for you. It's not free, though.
http://lobstertunes.com
Lobster looks pretty cool. I'm going to check it out and see if it offers a better experience than what I currently use (Andromeda - http://www.turnstyle.com/andromeda/home.asp).
sputnik said:
Lobster looks pretty cool. I'm going to check it out and see if it offers a better experience than what I currently use (Andromeda - http://www.turnstyle.com/andromeda/home.asp).
Click to expand...
Click to collapse
What do you find bad about Andromeda? I was thinking about giving it a try...
Here is one I have been wondering about. What software can you use to stream your local radio stations to your phone? I know about tuned.mobi and such, but the problem is that when a game comes on, they usually block the broadcast of the audio stream even though it is playing on the local AM radio station. I want to be able to broadcast my local radio stations (AM and FM) to my phone so I can still get the games.
I wonder if someone could not write a program that integrates everything available through orb into you wmp library i.e. some sort of plugin maybee we could put together a donation pot to get one of the dev's to work on the project
djlenoir said:
Here is one I have been wondering about. What software can you use to stream your local radio stations to your phone? I know about tuned.mobi and such, but the problem is that when a game comes on, they usually block the broadcast of the audio stream even though it is playing on the local AM radio station. I want to be able to broadcast my local radio stations (AM and FM) to my phone so I can still get the games.
Click to expand...
Click to collapse
you cant...if it isnt streamed, it cant be made out of thin air. get a radio.
dtrell said:
you cant...if it isnt streamed, it cant be made out of thin air. get a radio.
Click to expand...
Click to collapse
lol, I have a radio...multiple radios. I think you may have misunderstood me. If I got something like this device would I be able to stream it to my phone? I travel... when I am in another state, I can not stream my local radio station broadcasts through the internet to listen to games (blacked out). However, they are playing on the radio station if I were at home and able listen to my radio.
well I think I finally found my cream of the crop... saw this thread and I have to say, andromeda is the BEST solution I've found for getting my music to my PPC...
it works very well with PIE and is very zippy zippy zippy...
I've tried:
1) lobstertunes - buggy, slow, doesn't work with all ROMs
2) gnump3d - buggy perl script, cool features but crashes a lot
3) orb - as you all have stated, interface sucks in PIE and too hard to navigate
4) andromeda - FAST, stable, and CLEAN... worth every penny of the $20 lol
I like the interface of Andromeda the best, not to mention it's speed. Although you can create a playlist, you still can't just "queue" one up...unless I'm missing something.
Took me some tweaks to get it to work too. Have to rename the asp to m3u and make it executable on the server. I also had to use a third party player.
What player are you using? Also, when I click on a file to stream, it always asks me if I want to overwrite the existing m3u. I say yes and it works fine, but ya know
cpujunky said:
Took me some tweaks to get it to work too. Have to rename the asp to m3u and make it executable on the server. I also had to use a third party player.
What player are you using? Also, when I click on a file to stream, it always asks me if I want to overwrite the existing m3u. I say yes and it works fine, but ya know
Click to expand...
Click to collapse
Yup gotta do a few tweaks but it ends up workin'... yes same thing with overwiting the file but that's typical... I use TCPMP and it works flawlessly.
Zenoran said:
well I think I finally found my cream of the crop... saw this thread and I have to say, andromeda is the BEST solution I've found for getting my music to my PPC...
it works very well with PIE and is very zippy zippy zippy...
I've tried:
1) lobstertunes - buggy, slow, doesn't work with all ROMs
2) gnump3d - buggy perl script, cool features but crashes a lot
3) orb - as you all have stated, interface sucks in PIE and too hard to navigate
4) andromeda - FAST, stable, and CLEAN... worth every penny of the $20 lol
Click to expand...
Click to collapse
I like both mundu and resco radio, but they are streaming only. I may try andromeda, PM me with details please.
Do you have a mac?
I'm not sure this would work for you, but it's something that I'm going to try once the needed adapter comes in.
I feel slingbox works really well on my phone and I use it to stream live TV. For my media files I'm planning on using my mac mini which has an IR sensor for the remote and Front Row. The front row interface is very similar to the interface on an ipod and the commands are supposedly supported by slingbox. Once I get the adapter for vga-svideo I will set it up. The only downside I can think of is that audio when watching TV doesn't come over in good quality unless I have it in audio only mode, but this might not be a problem with Front Row where there will be very little visual data transmitted for audio files.
The reason a mac mini is nice is that it has a built in IR sensor. This bet this will work with windows media center too if you have something to control it with IR. Another potential downside is that the computer pretty much needs to be dedicated to working as a media server lest you forget to put it back into media mode.

Is it possible to stream audio from phone to network?

Hi!
As the title says, i wondered if Android allows you to stream audio from the device to the network? Specifically for Airfoil, is it possible to play music from spotify (etc.) from the phone, on my other airfoil units?
I contacted the developer, and he was unsure wether this was possible with the current APIs or not, i would sure be willing to pay for such a program at least
Such a program exist for iOS already: http://itunes.apple.com/app/reemote-for-airfoil/id396381723?mt=8
Thanks!
Will this thread be of any help:
http://forum.xda-developers.com/showthread.php?t=1104692
That seems to be the opposite way of what i am interested in. Have found that my DoubleTwist media player supports streaming to my Mac Mini running XBMC, so i dont see why this wouldnt work for Spotify/wimp instead.
An app that "hijacks" the audio source, and sends it via WiFi to Airplay/Airfoil/DLNA supported devices would be what i am looking for i guess.
Mixy said:
An app that "hijacks" the audio source, and sends it via WiFi to Airplay/Airfoil/DLNA supported devices would be what i am looking for i guess.
Click to expand...
Click to collapse
This is something i really want too, what Apple has done with their Airplay is something that would be awesome to have in our Android devices.
agreed, need to audio-hijack all system sound to send to airplay. want to be able to sent pandora, etc controlled from my phone to an airplay receiver.
There is some development going on towards this. I use Shairport on an old phone to act as an Airport express :
http://code.google.com/p/vavi-apps-shairport/
The Airports keys were 'Cracked ' so there will be something eventually.
http://m.engadget.com/default/artic...-unofficial-airp/&category=classic&postPage=1
Regards
I bought winamp for android.
It will be nice if this development can be as you mention.
Hope I dont have to buy doubleTwist since I like Winamp.

GoDaddy Streaming to Photon

I store a ton of music on my godaddy hosting account. Is it possible to stream this music to my MoPho? Streaming from my PC to my phone is not an option for me.
Install subsonic..
http://www.subsonic.org/pages/index.jsp
https://market.android.com/details?id=net.sourceforge.subsonic.androidapp&feature=search_result
-mark
Thank you. Although, I may have missed something but it seems like Subsonic is for streaming from PC to Android. I want to stream from my godaddy server to Android without involving my PC.
Subsonic isn't a remote server-based solution.
You need something like http://www.turnstyle.com/andromeda/ . There are a few others but I've never seen one I really liked so I stopped keeping track of them.
What I ended up doing - and I am sure you could as well (I host from a home based server instead of godady). Is writing a PHP page that reads through a directory of videos/mp3s and creates an HTML5 web page so you can click on a video or song and have ti play in the native browser/player.
It's really primitive right now, but works for my needs and I have not had a need to make it any fancier than it is.
This was the best option for me for a home/away media server that I can control and do what I want with my own liking.
my only problem with it seems to be speed - but then again it is a crumby linux server with like 512 mb of ram and old IDE raided hard drives on an ATT dsl connection. :-/
...use Google Music?
Kevets said:
Subsonic isn't a remote server-based solution.
You need something like http://www.turnstyle.com/andromeda/ . There are a few others but I've never seen one I really liked so I stopped keeping track of them.
Click to expand...
Click to collapse
Andromeda is getting closer to what I'm looking for. I'd also like the ability to play playlists and podcasts where I can resume listening where I left off. Plus, I'd rather use an app for playback rather than a website. Any other recommendations?
mrinehart93 said:
...use Google Music?
Click to expand...
Click to collapse
I have three challenges/questions:
Anyone have an invite you can give me?
I have many gigs of music and podcasts I want to listen to. What is the limit with Google Music?
Can I resume playback position with podcasts?
Ok, I got an invite to GMusic and it looks pretty cool. If I can get enough space and if it is possible to resume playback position in podcasts, GM will meet my needs. I'm uploading my audios now... (keeping fingers crossed)
Kevets said:
Subsonic isn't a remote server-based solution.
You need something like http://www.turnstyle.com/andromeda/ . There are a few others but I've never seen one I really liked so I stopped keeping track of them.
Click to expand...
Click to collapse
I run subsonic on my hosted Linux server. It works really well for my remote streaming needs.
Sent from my MB855 using Tapatalk
diomark said:
I run subsonic on my hosted Linux server.
Click to expand...
Click to collapse
This sounds promising! How do I install subsonic on my Godaddy hosted server so I can stream everything to my phone?
Can subsonic be configured to remember playback positions in podcasts?
sjamie said:
This sounds promising! How do I install subsonic on my Godaddy hosted server so I can stream everything to my phone?
Can subsonic be configured to remember playback positions in podcasts?
Click to expand...
Click to collapse
actually maybe godaddy's too limiting.. here's a thread about it -
http://forum.subsonic.org/forum/viewtopic.php?t=2739)
I know it saves my song positions.. don't think podcasts would be any different.. -m
Ok, I'll follow that thread. Thank you for posting it. Hopefully, someone has made a way to do this!

[Q] App to turn Android into Air Play device?

Hi all,
I've been playing with the airplay apps over the last week or so but am hitting some problems.
I have a couple of old android phones setup around my house which have speakers connected to them. I run Bubbleupnp on each of those devices which then effectively sets them up as DLNA libraries and renderers. I have two other devices setup - an android tablet and a QNAP NAS. My QNAP NAS supports DLNA and this is where my music library is stored. The android tablet is used as a controller, again running Bubbleupnp, where I can choose the NAS as the library and either of the android devices as speakers. This works great.
One problem is that with Bubbleupnp, it is only possible to select one renderer which means it is not possible to stream to multiple speakers at the same time. E.g. I want to stream to my kitchen and my living room at the same time with the music completely in sync. Another problem is that when using Bubbleupnp, music sent to the renderer must be from a library and cannot be live streaming on the controller device (E.g. Spotify, Youtube etc.).
I then found AirAudio which actually fixed both of the issue (Sort of). Firstly, when running AirAudio on a rooted device, you can push any sounds from the controller device to any of the DLNA renderers (E.g. Spotify). Secondly, it is possible to stream to multiple DLNA renderers at the same time (Obviously, Bubbleupnp still needs to be running on these devices to make them DLNA devices). The only problem here is that when sending to multiple renderers at the same time, they are not in sync. The is due to the actual streaming being performed on the individual devices and therefore they all perform differently.
I emailed the AirAudio development team and they were extremely helpful in explaining the details of this to me and even recommended some other apps to try which might help. The apps which they recommended were Android HiFi and AirBubble where it is possible to set different delays for the different renderers. I am yet to actually try this as I imagine that the delay is not exactly the same each time I try and play music and therefore the delay will need to be altered regularly (Bit of pain).
This whole problem is a limitation of DLNA - you cannot synchronise multiple devices. Apparently you can synchronise multiple AirPlay devices?
So, after all of that, my question is, 'Is it possible to turn an Android device into a AirPlay device?' The developers at AirAudio seemed to think that audio synchronisation of AirPlay receivers for Android is not supported, if this is true, does anyone know why? Seems mad that something as powerful as an Android phone can't be an AirPlay device.
Thanks in advance,
Regards,
Dan
Sorry to bump this but just hoping that someone reads this who can help.
Dan
Last try...
Anyone got any ideas here?
Effectively I want Boombotix Sync for Android (This is for iphone only). There's also Speakerfy but it's limited to music library on the host and it's ui is horrible.
can't believe there's still no solution to this. .
I can't believe that no one out there isn't trying to do the same as me!
I still can't find a suitable solution. Please please help.

[DEV] Stop sound from official Radio, Mediaplayer, DAB, etc

Hello,
I'm trying to write a mediaplayer application for the MTCB. An issue that I'm not able to solve now is to stop the music from the other stock applications when my application start.
Does anybody has an idea about how to do that ? Seems that's not a possibility to use audio focus ...
Any help will be much appreciated.
mumu02 said:
Hello,
I'm trying to write a mediaplayer application for the MTCB. An issue that I'm not able to solve now is to stop the music from the other stock applications when my application start.
Does anybody has an idea about how to do that ? Seems that's not a possibility to use audio focus ...
Any help will be much appreciated.
Click to expand...
Click to collapse
Decompile stock apps and look inside.
mumu02 said:
Hello,
I'm trying to write a mediaplayer application for the MTCB. An issue that I'm not able to solve now is to stop the music from the other stock applications when my application start.
Does anybody has an idea about how to do that ? Seems that's not a possibility to use audio focus ...
Any help will be much appreciated.
Click to expand...
Click to collapse
You should try and PM Booroondook. Below is a Google-translation of his post on this matter:
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
The developers originally wanted to make a device completely replaces the car's radio. Moreover, up to the most complete simulation interface to motorists who allegedly used to. In addition, radio conceived such that it immediately ( "out of the box") would perform all the functions inherent in the car radio. Therefore it developed a set of so-called "factory" of applications that simulate the function of "advanced" regular radio - "Radio", "a DVD", "Music", "Video", "Photos", "the iPod," "Handsfree Bluetooth". By this set has also been added to the navigation functionality - as Application- "starter" selected by the user of the navigation program.
More precisely, mutual exclusion - integration system has been created for these applications. You work, "Radio", you run the "Music" - "Radio" is turned off. Launched the "Video" - disconnected "Music." And so on. It has even invented a special function (called by the MODE key), switching these applications in a circle - by analogy with the head unit.
These applications (according to developers) would have to cover all the needs of the motorist. And the Android operating system was the basis of fashion or marketing reasons, or both.
All would be good, but the developers have not considered (or ignored) the fact that the Android OS allows you to install additional applications. These additional user-installed applications do not "fit in" with the original logic of the functional simulation regular radio.
We take your specific example. You factory application "Music" chose a third-party, the establishment of additional "Google Music" app. It is clear that it is your choice to which you are entitled. But the developer is not able to assume that you install this application - and therefore your "Google Music" is not involved in "switching system" applications and "dampens" the other application.
What's in this case? Either put up with such behavior (ie, do not forget to manually turn off the "Radio" before turning on the "Google-Music"), or you can use some tricks to automate this business - good Android OS lets you do things with the help of supporting applications and system modules.
Members of our branches also have repeatedly faced with problems similar to yours. Force enthusiasts have developed tools that optimize the behavior of third-party applications such as media players.
Do not be lazy, look at the cap, there is a lot of links. Note the module Car Audio Service, as well as a set of tools from a reputable MVG-V70.
.............................................
Link to original post
.............................................
Unfortunately he is not that active on XDA
If someone is interested, finally it's very simple
private AudioManager am = null;
this.am = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
// Cut sound from stock audio applications
this.am.setParameters("av_channel_exit=dtv");
// Enable sound from stock audio applications
this.am.setParameters("av_channel_enter=dtv");
mumu02 said:
If someone is interested, finally it's very simple
private AudioManager am = null;
this.am = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
// Cut sound from stock audio applications
this.am.setParameters("av_channel_exit=dtv");
// Enable sound from stock audio applications
this.am.setParameters("av_channel_enter=dtv");
Click to expand...
Click to collapse
Could you please elaborate? I'm having the same issue, however I want to apply this behaviour to already existent apps, eg. Google Play Music (to pause everything else when Google Music starts)... Does your solution apply to my case and how should I procceed? Thank you so much in advance!
sarruma said:
Could you please elaborate? I'm having the same issue, however I want to apply this behaviour to already existent apps, eg. Google Play Music (to pause everything else when Google Music starts)... Does your solution apply to my case and how should I procceed? Thank you so much in advance!
Click to expand...
Click to collapse
I think one solution is to write a very simple application with just the mentionend code Inside. Then use tasker, and when you launch Google Play Music ask him to launch the small program before.
I can build the small app for you if you want to try ?
For my media player it's not working 100%. I'm able to cut off the sound when I launch my app but when I want to launch again the stock radio , it dosen't actually stop my mediaplayer since I can't get any notification Inside my app from the stock app.
mumu02 said:
I think one solution is to write a very simple application with just the mentionend code Inside. Then use tasker, and when you launch Google Play Music ask him to launch the small program before.
I can build the small app for you if you want to try ?
For my media player it's not working 100%. I'm able to cut off the sound when I launch my app but when I want to launch again the stock radio , it dosen't actually stop my mediaplayer since I can't get any notification Inside my app from the stock app.
Click to expand...
Click to collapse
What do you mean that you cannot get any notification?
What I've been doing till now is create a custom app using tasker (with a plugin called App factory, since my knowledge in programming doesn't go so far) and in fact use the created app to force close the radio app before launching, in my case, Google Play Music. But then, when I launch the radio app (or even the Bluetooth app)again, Google Play Music stops... So every shortcut of my preferred music app or even the mode.ini I use for the Xposed module I need to cycle through hu modes using my swc is associated not with the actual app, but with one custom made to suit my needs. Of course is kind of a mess, but so far haven't found anything better and working... Could you suggest anything better? Do you believe that there's an easier way for my case? Thank you so much for your help..!?
sarruma said:
What do you mean that you cannot get any notification?
What I've been doing till now is create a custom app using tasker (with a plugin called App factory, since my knowledge in programming doesn't go so far) and in fact use the created app to force close the radio app before launching, in my case, Google Play Music. But then, when I launch the radio app (or even the Bluetooth app)again, Google Play Music stops... So every shortcut of my preferred music app or even the mode.ini I use for the Xposed module I need to cycle through hu modes using my swc is associated not with the actual app, but with one custom made to suit my needs. Of course is kind of a mess, but so far haven't found anything better and working... Could you suggest anything better? Do you believe that there's an easier way for my case? Thank you so much for your help..!
Click to expand...
Click to collapse
What I mean, there is no communication between stock app and let's say a regular android app. I mean, when you launch a stock app, there is no way (at least I didn't find it) for another regular app to know that you launch the stock one.
In fact what I want to do is that when I launch my media player it stoppes the Stock app (This goal is reached) but then when I launch again a stock app, it should stop my mediaplyer app (Actually it just put the sound done. To sumarize what I want is that each time I bring an app in fordeground it should stopp all other (Music player). In fact it's the case between the stock media player and the stock radio.
So I think so far we are both at the same place
mumu02 said:
What I mean, there is no communication between stock app and let's say a regular android app. I mean, when you launch a stock app, there is no way (at least I didn't find it) for another regular app to know that you launch the stock one.
In fact what I want to do is that when I launch my media player it stoppes the Stock app (This goal is reached) but then when I launch again a stock app, it should stop my mediaplyer app (Actually it just put the sound done. To sumarize what I want is that each time I bring an app in fordeground it should stopp all other (Music player). In fact it's the case between the stock media player and the stock radio.
So I think so far we are both at the same place
Click to expand...
Click to collapse
Yeah, no matter how much I have searched, I haven't found any better solution..! But I'll keep trying, this solution doesn't satisfy me and isn't at all instinctive... Any way, I'll let you know if I find anything else! Cheers... ???
I thought all this was sorted about 3 years ago when @agentdr8 developed his XposedMTC app ?
typos1 said:
I thought all this was sorted about 3 years ago when @agentdr8 developed his XposedMTC app ?
Click to expand...
Click to collapse
My work on XMTC ceased a while back, but what was posted above was correct at the time. The audio output was controlled by the MCU, and triggered via different AudioManager object parameters.
The problem is, all Android app-based audio is done via 1 MCU output (av_channel=sys IIRC). So anyone designing an app would have to determine what the current av_channel parameter is set to. The stock MTC apps do that sort of (they just assume the newly-launched app is taking over audio control, and switches the av_channel).
agentdr8 said:
My work on XMTC ceased a while back, but what was posted above was correct at the time. The audio output was controlled by the MCU, and triggered via different AudioManager object parameters.
The problem is, all Android app-based audio is done via 1 MCU output (av_channel=sys IIRC). So anyone designing an app would have to determine what the current av_channel parameter is set to. The stock MTC apps do that sort of (they just assume the newly-launched app is taking over audio control, and switches the av_channel).
Click to expand...
Click to collapse
That was pre @7floor audio mod which bypasses the MCU and gives Android control of the audio IC, I wonder how XposedMTC works with that ? Not heard any one say that I remember.
mumu02 said:
If someone is interested, finally it's very simple
private AudioManager am = null;
this.am = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
// Cut sound from stock audio applications
this.am.setParameters("av_channel_exit=dtv");
// Enable sound from stock audio applications
this.am.setParameters("av_channel_enter=dtv");
Click to expand...
Click to collapse
Does this code work as it is?
It is a java code isnt it?
You said it worked for you to cut the audio from stock apps, but inside there is the option to enable it as well? I don't understand?
I would like to stop dvd using this code in tasker. I assume I have to change dvr with dvd and remove this part : // Enable sound from stock audio applications
this.am.setParameters("av_channel_enter=dtv");
I am sorry but I dont unsterstand java.
A time ago I creaTed Modeswitch https://forum.xda-developers.com/an...t/app-modeswitch-spotify-swc-control-t3310966
An application to help with audio focus on our devices. I am now trying to optimize it to speed it up, and now allow it change the audio focus even if the mode circle didn't run ( that was a limitation of the releases until now)
I would appreciate your help
p_mike83 said:
Does this code work as it is?
It is a java code isnt it?
You said it worked for you to cut the audio from stock apps, but inside there is the option to enable it as well? I don't understand?
I would like to stop dvd using this code in tasker. I assume I have to change dvr with dvd and remove this part : // Enable sound from stock audio applications
this.am.setParameters("av_channel_enter=dtv");
I am sorry but I dont unsterstand java.
A time ago I creaTed Modeswitch https://forum.xda-developers.com/an...t/app-modeswitch-spotify-swc-control-t3310966
An application to help with audio focus on our devices. I am now trying to optimize it to speed it up, and now allow it change the audio focus even if the mode circle didn't run ( that was a limitation of the releases until now)
I would appreciate your help
Click to expand...
Click to collapse
Wouldnt it be easier to go into factory settings and uncheck "DVD" ? That would remove the DVD from the circle entirely.
typos1 said:
Wouldnt it be easier to go into factory settings and uncheck "DVD" ? That would remove the DVD from the circle entirely.
Click to expand...
Click to collapse
I am aware of this. Actually my app has already a setting to exclude dvd from mode circle. But its not what I am trying to do. If you are listening to a track on cd/dvd disk and you open spotify (or other music app) the audio from the track continues to play, and you have audio from 2 sources !?
p_mike83 said:
I am aware of this. Actually my app has already a setting to exclude dvd from mode circle. But its not what I am trying to do. If you are listening to a track on cd/dvd disk and you open spotify (or other music app) the audio from the track continues to play, and you have audio from 2 sources !?
Click to expand...
Click to collapse
Right, I thought this was sorted by @agentdr8 3 years ago with MTCXposed.
typos1 said:
Right, I thought this was sorted by @agentdr8 3 years ago with MTCXposed.
Click to expand...
Click to collapse
p_mike83 said:
I am aware of this. Actually my app has already a setting to exclude dvd from mode circle. But its not what I am trying to do. If you are listening to a track on cd/dvd disk and you open spotify (or other music app) the audio from the track continues to play, and you have audio from 2 sources !
Click to expand...
Click to collapse
It was something I tried to address with XMTC and had moderate success with. Unfortunately that code has aged beyond the current ROM releases, and I didn't have time to keep it up to date.
In order to catch all launches of audio-outputting apps, you'd need an Xposed module to hook into either the current Launcher process to know when apps are opened, or into the system ActivityManager. From there, you could interrogate the AudioManager instance and get/set parameters to flip audio sources. It was something I was looking into for XMTC, but never made any progress.
EDIT: Not sure if you've tried adding in this to switch away from the dvd source and back to the Android source:
Java:
am.setParameters("av_channel_exit=dvd");
am.setParameters("av_channel_enter=sys");
Also, I don't think any of this would matter if the @7floor mod was done. Everything should be piped into the standard Android audio streams at that point.
agentdr8 said:
It was something I tried to address with XMTC and had moderate success with. Unfortunately that code has aged beyond the current ROM releases, and I didn't have time to keep it up to date.
In order to catch all launches of audio-outputting apps, you'd need an Xposed module to hook into either the current Launcher process to know when apps are opened, or into the system ActivityManager. From there, you could interrogate the AudioManager instance and get/set parameters to flip audio sources. It was something I was looking into for XMTC, but never made any progress.
EDIT: Not sure if you've tried adding in this to switch away from the dvd source and back to the Android source:
Java:
am.setParameters("av_channel_exit=dvd");
am.setParameters("av_channel_enter=sys");
Also, I don't think any of this would matter if the @7floor mod was done. Everything should be piped into the standard Android audio streams at that point.
Click to expand...
Click to collapse
Oh, I thought that XposedMTC was still THE way to stop 2 sources from playing at the same time and to add extra sources into the src button (I use the built in apps myself so dont use XMTC for that)>
typos1 said:
Oh, I thought that XposedMTC was still THE way to stop 2 sources from playing at the same time and to add extra sources into the src button (I use the built in apps myself so dont used XMTC for that)>
Click to expand...
Click to collapse
Thanks! I came along this as I was trying to find the answer. (You have to remove "this" from the code). But anyway I already found an other work around ?. So time for testing my app. The first tests were successful!?

Categories

Resources