Questions tagged [audiotrack]
AudioTrack class in standard Android API for playing back raw Audio.
422
questions
0
votes
0
answers
55
views
Android. Using the AudioTrack.write method in coroutine context makes app crash
I have the lines of code below. I am trying to play a stream and I am using AudioTrack.
CoroutineScope(Dispatchers.IO).launch {
withContext(Dispatchers.IO) {
...
0
votes
0
answers
20
views
Audio tracking with agora
I would like to find out how long each person speaks during an online meeting using Agora Web. I looked around and tried writing some code to accomplish this but it didn't work as expected.
Is there a ...
0
votes
1
answer
47
views
Android Java sound recorded with AudioRecord has noise when played
I'm recording voice using AudioRecord, send it to server, receive it on both Android and Web. On Android, I'm playing the audio using AudioTrack, and there's a "tttttt" noise. On web, such ...
0
votes
0
answers
22
views
Android AudioTrack with setLoopPoints cuts out early
I am writing a simple android compose app in which I want to do some basic synthesized sounds. My starting problem is getting a sine wave to repeat forever. For now, I am trying to get AudioTrack, ...
0
votes
0
answers
25
views
How to control the volume of audio track in mediastream object?
I have been working on a audio/video streaming site using the AWS IVS service in angular. I have created a media stream object by creating capture when the audio elements plays the music and then add ...
0
votes
0
answers
16
views
Latency playing audio with AudioTrack from hash map after clicking button
I know Android is known for having audio latency issues but I have done everything I know of to reduce it and I still have noticeable latency in my music application between pressing the button and ...
1
vote
1
answer
139
views
Android: Record and Playback audio from different devices
I'm trying to record and play audio using different devices with AudioRecord and AudioTrack and setting preferredDevice to set the devices to each.
audioRecord = AudioRecord(
...
2
votes
1
answer
56
views
Audio sample not playing as expected on android11
I am trying to extract and play audio samples from a video file in Android 11. However, I have followed some tutorials from the official documentation, but it still doesn't work. All I get is noise ...
0
votes
1
answer
179
views
Type of a video HTML element in Typescript
I am trying to detect the presence of audio from a video loaded within a video HTML element compatible with both Mozilla and Chrome. I am using React Player package.
The following code is a sample of ...
0
votes
0
answers
31
views
Can't get AudioTrack to work properly on Android TV
I'm writing an Android AirPlay receiver.
I use java-airplay-server from GitHub,
But when I try to stream PCM Byte audio with Android AudioTrack
,Works fine on mobile but doesn't stream properly on ...
0
votes
0
answers
38
views
Noise occurs when playing PCM data using AudioTrack
I'm using AudioRecord to store the recorded data and AudioTrack to play the data.
However, only noise is played.
My audio record code.
val audioRecord = AudioRecord(MediaRecorder.AudioSource.MIC, ...
0
votes
0
answers
23
views
AudioTrack not change speed and pitch for song after save output file
I need to change the speed and pitch of the sound using the AudioTrack class
This is my code but it's not working
@Throws(IOException::class)
private fun saveSong() {
val audioTrack = AudioTrack(...
2
votes
1
answer
346
views
Flutter Audio Editing SDK [closed]
I am looking for an SDK which supports Audio editing features.
The features I am looking for are as below
Audio Trimming
Audio Splitting
Audio Volume management
Adding another audio
Merge Audio
Undo/...
1
vote
1
answer
2k
views
AudioTrack: Use of stream types is deprecated
I am trying to use AudioTrack to play back sample data. I hear no sound from the device but I see this in the logcat:
AudioTrack: Use of stream types is deprecated for operations other than volume ...
1
vote
0
answers
31
views
How to add delay to a placback in Android
The idea: I am trying to do an application like speech jammers. In theory when you listen yourself with a delay, you cant be able to speak properly.
So i am recording input from mic then playing it ...
1
vote
2
answers
63
views
How to wake up an inactive AudioTracks property
I could obtain the correct AudioTracks.length through a button click; however, I cannot obtain it without such an action.
Please see my code below. I could obtain it at line (B) but cannot at (A). Why?...
0
votes
1
answer
128
views
Cannot conect AudioTrack to audiofx.Equalizer in kotlin
I have been trying to use audiofx.Equalizer in Kotlin but I having the following problem:
AudioFlinger could not create effect 0bed4300-ddd6-11db-8f34-0002a5d5c51b / ec7178ec-e5e1-4432-a3f4-...
0
votes
1
answer
543
views
Android, how to add multiple tracks to peer connection in WebRTC?
I want to send multiple track to remote peer. For example, videoTrack, audioTrack, shareScreenTrack.
I used UNIFIED_PLAN like below usage.
val rtcConfig = PeerConnection.RTCConfiguration(
...
0
votes
0
answers
143
views
Reading bytes from audio url
I've mp3 file on a url. I would like to stream it and manipulate the file in real-time, without downloading the whole file first. How can I do it?
I would like to do something like this pseudo code:
...
0
votes
1
answer
380
views
Can find example database for music (include stream_uri of music)?
Where can i get example database for music (include stream_uri of full audio track), just for example project?
Thank you!
2
votes
0
answers
336
views
Unable to get Metadata form video using exoplayer without playback
I am trying to get video metadata using exoplayer without playback as mentioned in document
when i try to run i cannot get list of audio track and subtitle track from local video file.
MediaItem ...
1
vote
0
answers
138
views
Does getMinBufferSize always return the same value for AudioTrack and AudioRecord?
In Android, when using the classes AudioTrack, and AudioRecord, you can find the minimum buffer size (for a given sample rate, channel config, and audio format) for the user's device with the static ...
0
votes
1
answer
121
views
Is there any way that we can save/ record the data that is played on audioTrack in android
I want to record the audio that is played by using the audio track. Can someone please help me out on this
0
votes
1
answer
255
views
Why Can't I Play Raw Audio Bytes Using AudioTrack's Static Mode?
I have an Android app where there is some raw audio bytes stored in a variable.
If I use an AudioTrack to play this audio data, it only works if I use AudioTrack.MODE_STREAM:
byte[] ...
0
votes
1
answer
527
views
How to add an Android AudioEffect LowPass Filter?
I'm trying to add a LowPass filter to an AudioTrack or MediaPlayer, but I don't think it exists.
It seems that the Android Audio Framework, unlike the Web Audio API and iOS, doesn't provide such ...
0
votes
1
answer
475
views
Android AudioFocus with AudioTrack hardly works
I use AudioTrack to play some audio like GPS navigation does. Of course, I need to ask for an audio focus, but my ugly code doesn't make the trick as I expected. I hear the audioTrack sounds, but I ...
0
votes
1
answer
1k
views
Getting No audio tracks in MediaStream issue in firefox
I am capturing user screen and audio using getDisplayMedia and getUserMedia and able to record the complete screen capture. But this works only on Chrome and not on Firefox. When I run my application ...
1
vote
1
answer
435
views
Video.js - How to add multiple audio tracks to the video.js player?
I am working on a project where I have to create a Video player which has multiple audio tracks. I gone through Video.js documentation but couldn't figure it out how can I do it.
I have one .mp4 video ...
1
vote
0
answers
156
views
Android: confused about how to get amplitude of a frequency generated and played by AudioTrack
In my app I generate list of sounds with different frequencies, for example 1000Hz, 2000Hz, 4000Hz ... for left and right channel:
private AudioTrack generateTone(Ear ear) {
// fill out the ...
1
vote
1
answer
564
views
How to use AudioTrack in static mode
I want to play float arrays on Android. I wanted to go the (what I thought was the) easy way first so thought I'd use AudioTrack. I chose to use static mode because the audio stream is not continuous. ...
0
votes
1
answer
186
views
Volatile variable change lag between threads in Android Studio Java
I would like to preface this by claiming that I am very new to android studio and java (and even this level programming in general). I am working on a simple audio synthesis application, and I was ...
0
votes
1
answer
249
views
Android Studio App crash when running a thread
I would like to start off with the disclaimer that I am very very new to Android Studio and Java Script, and programming isn't even my forte. However, I am trying to develop an audio synthizer ...
0
votes
2
answers
2k
views
Remux MKV removing subtitles and unwanted audio tracks using mkvmerge in batch file
I am creating a windows batch file to find all mkv files in a folder, check if it has multiple audio tracks and subtitles. If it does, remove all subtitles and all audio tracks except for ENG and UND. ...
0
votes
1
answer
831
views
Retrieving the name of an audio track from a stream
I want to reproduce audio streams with the <audio> tag and display the name of the current track. To that end I have been using the audio's audioTracks property.
I know that this feature is ...
0
votes
2
answers
61
views
How do I call a join table in my show method? UPDATED
[UPDATE, Scroll down for solution]
I am busy developing a music streaming application with Rails and am stuck on a basic problem. I am not sure how to call my joint table.
This is my flow:
User has ...
1
vote
0
answers
123
views
Android audio effects not attaching to audio stream in real time once the stream has started
I'm trying to make an app for Android which receives a PCM audio stream from a Raspberry Pi 4 using a TCP protocol. The app has to be able to apply audio effects in real time to this audio stream, ...
0
votes
0
answers
49
views
Playing audio from ByteArray
I am new to Bluetooth Low Energy(BLE)and android ,I am getting a ByteArray from Ble Device i have to convert and play audio from that bytearray ?? What should i do ??
I already have tried ...
1
vote
0
answers
215
views
App crashing with Fatal signal 6 (SIGABRT) when trying to create sine wave audio above 12000KHz
I am trying to create sine wave audio from 20Hz-20KHz. I am only able to create sine wave till 12KHz. After that the app is crashing with the following error
A/libc: Fatal signal 6 (SIGABRT), code -6 ...
1
vote
1
answer
58
views
AudioTrack only playing noise instead of recorded voice
I want to play recorded voice using audio track but its making noise I tried different techniques but unable to solve this issue.
I Changed:
frequency rate, Audio Format Channel Audio Formate Encoding
...
6
votes
1
answer
3k
views
Merge two audio tracks into one track
I am having a issue in combining two audio tracks into one, in order to add the whole merged audio to a video track.
this.promises = [navigator.mediaDevices.getUserMedia({ audio: true, video: true })...
0
votes
0
answers
773
views
I'm trying to produce sound in Android only with the headphones
I'm developing an App using Flutter and I only would like to emit sound through the headphones or the top speaker (The one used for phone calls). Currently it uses the big speaker and headphones at ...
2
votes
1
answer
152
views
Flush AudioTrack in Xamarin.Android in an async way
AudioTrack.Flush doesn't finish his work, I found out that while AudioTrack is flushing (in an other thread), if I write some data, it stop flush, so I tried to lock AudioTrack while is flushing (no ...
3
votes
0
answers
294
views
Stop transmitting audio when app is in background in android webRTC/AppRTC
I am working on webRTC on the android platform. I run the appRTC code(https://github.com/njovy/AppRTCDemo). Now I joined the call from the android mobile and one from the web(https://appr.tc/). it is ...
0
votes
1
answer
990
views
Count the audio tracks in a movie file with python
I'm trying to get the number of audio tracks in a video file. The video have multiple tracks (like different, selectable languages for the same movie.) So if there are three optional languages for the ...
1
vote
0
answers
145
views
Android AudioTrack generate buffer with one frequency in one ear and a second frequency in the other ear
I'm generating a tone on android
public void toneer(){
final int duration = 10; // duration of sound
final int sampleRate = 22050; // Hz (maximum frequency is 7902.13Hz (B8))
final int ...
0
votes
1
answer
113
views
Can't hear generated sine waves of durations shorter than 100ms in Android
I put together the code below to generate and play sine wave sounds on Android devices.
numSamples determines the length of the sound based on the sampling frequency (44.1KHz). So, if I for instance ...
0
votes
1
answer
734
views
Android Multimedia Tunneling Sync Header
Context
I'm creating an Android application playing Media Source Extensions streams using Multimedia Tunneling. I'm using the API call flow as provided by the documentation. Audio part is handled ...
1
vote
0
answers
195
views
How to force audio playback to headset while recording on Bluetooth java android?
In my app i'm recording audio via Bluetooth and playback the audio to wire headset at the same time. My app works on older OS but not the latest OS.
I've been searching and reading old postings and ...
0
votes
1
answer
333
views
Why doesn't onMarkerReached get called in the next play unless I leave enough time after stopping?
(Sorry to fix it over and over.)
I want to play a new stream immediately after stopping AudioTrack.
However, if you do not start playback after a few milliseconds after stopping playback with stop ()...
0
votes
0
answers
101
views
android.media.AudioTrack stereo volume 0 on one channel: still very soft sound of other channel
When using android.media.AudioTrack to generate a sinus sound at runtime there are two ways to set the volume to 0 in the left or right channel: with the setStereoVolume method or by generating a 0 ...