can coders code any custom function they like?



For all the different coders, programmers etc out there. Let’s say you have a computer or phone and you want to make some custom functions. For example, for devices which don’t have something like Samsung’s Sound Assistant and you wanted to play an app through a separate speaker than the rest of the apps, can you program a function like this? A use for this may be to play music through a speaker but have all other app audio play through the device speaker as to not disrupt the music.

In: Technology


In the end the brain of the computer picks where to send what and can always send different parts different places. A coder just has to decide which to send where

It’s like when you have a computer with 2 screens, just in this case would be audio

From a purely computational standpoint, the only real limitation a programmer would have would be the amount of memory available to them.

In terms of something like what you describe where the program is communicating with other systems, it depends on how those systems allow the program to interact with them. In this case, if the underlying OS doesn’t offer a way for an app to request that a specific app re-route its audio to a different output device there isn’t much that the app developer could do. On the other hand, a programmer working on the OS would likely be capable of implementing such a thing, but in general they would still be similarly limited by the ways in which they can interact with the underlying hardware.

Yeah maybe. But it is not aas easy as you may think of. Or I am just triggered on the word function.

We cannot change existing programs eqsaly or add functionality to them.

>[in a phone] you wanted to play an app through a separate speaker than the rest of the apps,

That would depend how much control the OS gives the programs executing on it. For android at least, yes, you can simply choose where to send your audio signal. Easy.

If you wanted to write something that decided how OTHER software chose what output to use, that might be restricted. Interfacing with the OS like that or developing your own audio driver to handle how other software’s audio chooses where to go would be more involved. In general, people don’t like giving little apps the keys to the kingdom. It’s too easy to make that into some really nasty malware.

It’s very possible on a linux phone like LineageOS or something. It’s probably possible on Android (which has been removing free software portions over the years and getting more locked down). And I don’t think you have any prayer of doing it on Apple.

Most software out there has a source code, a (mostly) human readable text that once processed(compiled) creates the software. So if you could have access to that source code and means to compile that and run it on some hardware, you could do any custom thing you would like, according to the capabilities of the hardware in question. Also with the right tools, wich are not always easily and readily available to anyone, depending on the hardware, you could create your own software from scratch to do anything you can come up with to run on that piece of hardware. Your example seems very specific to something probably doable by the app maker, but not something any programmer could change in their own phone with just some lines of code.

If you can think of it, you can do it.

How much effort it takes to do it is what stops a lot of people

From a software development point of view yes, we can make functions that do just whatever we want.

Now, there are hardware limitations that impose limits to what you can do. For example, a phone can have 2 speakers but they can be hard wired together so you cannot send sound exclusively to just one of them.

There are also limitations imposed by the operating system either by security reasons (for example you can’t access files of other apps) or for design reasons (for example, the phone can physically have 3 or more speakers but the operating system may only expose left and right for apps and automagically decide what goes to the third one)