Questions tagged [audioflinger]

36 questions
2
votes
0 answers

When using the MediaPlayer API the audio stream stops after a few seconds of playback

I'm using Android's MediaPlayer API to play a stream of audio (http://www.abc.net.au/res/streaming/audio/hls/classic_fm.m3u8). After a few seconds (sometimes more, sometimes less) my audio stops but not error event is raised. On Logcat appears this…
mikehc
  • 999
  • 8
  • 22
1
vote
0 answers

Android mediaPlayer -19 error caused by a AudioFlinger init -12 error with android 12

I rarely ask questions since there is always a post somewhere explaining my issue but in this case I am running into a rabbit hole from where I am not able to get out alone. I had a tough time trying to understand what's happening with my app. I am…
1
vote
0 answers

What is the link between Usages and the Audio HAL?

I am trying to get audio working on a board to which we're porting Android. Currently, sounds played with usages such as USAGE_ALARM (4) are audible, whereas sounds played with usages such as USAGE_MEDIA (1) are silent. For the audible usages, we…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
1
vote
1 answer

Recording\Playing audio directly with libmedia\AudioFlinger

I'm checking out the possibility of interfacing directly to libmedia\AudioFlinger for playing\recording raw audio (like AudioTrack\AudioRecord do). The purpose is to workaround the minimum buffer size limitation of those 2 Java classes. I know that…
SirKnigget
  • 3,614
  • 2
  • 28
  • 61
1
vote
1 answer

LibGDX: AudioFlinger could not create track, status -12

I've recently added sounds into my LibGDX game. It's set up so that all the sounds I need are loaded into an AssetManager, and I retrieve them when I need to play them from a getSound(String name) method. It works fine for a little bit when you…
1
vote
0 answers

AudioRecord::processAudioBuffer() where audio buffer came from?

I look into record voice procedure and blocked in AudioRecord::processAudioBuffer(), here is the codes nsecs_t AudioRecord::processAudioBuffer() { ... status_t err = obtainBuffer(&audioBuffer, requested, NULL, &nonContig); ... } status_t…
p mai
  • 11
  • 2
1
vote
1 answer

AudioFlinger could not create track, status: -12

I'm trying to play an audio Stream using audioTrack, so i have created audioTrack like this: public AudioTrack create() { if (mTrack != null) { if (mTrack.getState() == AudioTrack.STATE_INITIALIZED) { return mTrack; …
Zenan.Lai
  • 11
  • 4
1
vote
1 answer

How to exclude STREAM_SYSTEM from REMOTE_SUBMIX

I am writing an app to record the audio from the device, using REMOTE_SUBMIX. According to this PAGE, it is said that Certain streams are excluded from the remote submix, including STREAM_RING, STREAM_ALARM, and STREAM_NOTIFICATION. These streams…
Robin
  • 10,052
  • 6
  • 31
  • 52
1
vote
1 answer

Attempting to open output file inside audioflinger (AOSP)

I'm attempting to write a simple log file from inside av/services/audioflinger/AudioStreamOut.cpp, for testing a custom ROM. I need it to work on Nexus 5X (bullhead). if (logFile1 == NULL) logFile1 = fopen("/sdcard/log_before.pcm", "ab"); if…
1
vote
1 answer

Between AudioTrack.write and AudioFlinger.read

I am checking the possibility of this way, if I got any silly thinking, please correct me. I would like to enhance the audio quality. According to some knowledge from web, I found that When an audio/music/sound is played , the AudioTrack will…
0
votes
1 answer

libaudioflinger can't link to prebuilt shared library

I have a prebuilt shared library with name "libaudio_ns.so" and I want the libaudiofinger.so link to this lib. I do as below: Adding prebuilt lib to android/external/ns/lib/libaudio_ns.so with Android.mk as below: `include…
0
votes
0 answers

How do you make Android use a particular sound card?

I'm porting AOSP to an iMX8 board. I have a working sgtl5000 driver and codec. i.e. When I run: smarc_mx8mq:/sdcard/Alarms # tinyplay file_example_WAV_1MG.wav Playing sample: 2 ch, 8000 hz,…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
0
votes
0 answers

Flutter: video_player fails if played 14 or more times

I got a list of videos using photo_manager package and whenever I play videos for more that 14, video_player package fails. I already tried seeking the current video to 0 second when I initialize another video again but it still doesn't fix. Here's…
Chiekko Red
  • 41
  • 1
  • 5
0
votes
1 answer

How the mixer thread created in Audio filnger and how the mapping is done between app and audio flinger mixer?

I am trying to map this arch in the source code. As I checked in source code there are multiple threads created by audio flinger like direct output thread, mixer thread, offload thread, etc. But I am not getting where should I change in…
Vishal Gupta
  • 768
  • 1
  • 5
  • 7
0
votes
1 answer

Class com.google.android.gms.internal.zzbfm extended by class com.google.android.gms.location.ActivityRecognitionResult is inaccessible

I'm currently trying to set up an android app called GoNote that I didn't write. The codebase is about a year old and uses React Native. However, there are Android-only and iOS-only dependencies. I had much trouble just getting the project to sync…
user9603444