soundengine | allows interacting with soundcards to e.g | Runtime Evironment library
kandi X-RAY | soundengine Summary
kandi X-RAY | soundengine Summary
A C++ addon for node.js that allows interacting with soundcards to e.g. play, record or process live microphone samples and send them back to the speakers. The module uses PortAudio to interact with the different host apis.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of soundengine
soundengine Key Features
soundengine Examples and Code Snippets
const soundengine = require('soundengine')
// Start live transmission from the default input device to the default output device at 22kHz
var engine = new soundengine.engine({sampleRate: 22050})
// Start recording
engine.startRecording()
// Apply
const soundengine = require('soundengine')
var devices = soundengine.getDevices()
Community Discussions
Trending Discussions on soundengine
QUESTION
I have a flutter app which uses Dart ffi
to connect to my custom C++ audio backend. There I allocate around 10MB of total memory for my audio buffers. Each buffer has 10MB / 84 of memory. I use 84 audio players. Here is the ffi flow:
C++ bridge:
...ANSWER
Answered 2021-Mar-28 at 03:15The actual cause, after discussions (in the comments of the question), is not because the memory allocation is too slow, but lie somewhere else - the calculations which will be heavy if the allocation is big.
For details, please refer to the comments and discussions of the question ;)
QUESTION
How can I separate AKSampler into a class? For instance:
SoundEngine.swift
...ANSWER
Answered 2020-May-08 at 06:50The simple answer to your "What am I doing wrong?" Is that you've initiated a second sampler that is part of your MySampler class that is being played, but is not connected to the signal chain. Sure, its parent is in the AKMixer, but that doesn't mean that some random property within it will be. Perhaps some other nice person will post a GitHub project of a better set up example.
QUESTION
I am currently working on a clone of Space Invaders in C++ and SFML and seem to be having a problem with the players position.
Currently, when the invaders shoot, the hit-box of the player continues to be the start position of the player recorded as 900, 500. This hit-box does not move the player. I am unsure of why and how to fix it. I know I cannot include game.h into invaders.h as game.h includes invaders.h hence causing an include loop. I need to take the player instance that is created in game.h, and pass that on to invaders.h for the hit-box of the player ton be passed along as well.
This is the code that relates to the invaders shots and the players position.
Game.h
...ANSWER
Answered 2020-Apr-07 at 14:22Putting a member of type Player
in Invaders
means it's a separate object, and probably not the same Player
used by Game
. So most likely player movement happens to the Game
's Player
, but the invaders are targeting their own distinct Player
which hasn't moved.
Since Invaders::updateBullets()
needs the Player
object, several options are:
- Pass a
Player&
orGame&
to theupdateBullets
function. - Make
Game
a singleton, with a public way to get theGame
object and therefore itsPlayer
object, from any context. - Keep a
Player*
orGame*
pointer in classInvaders
- but if those objects could ever be destroyed beforeInvaders
objects, dealing with that will be tricky. And this may be a bit "wasteful".
And in general, remember a class definition isn't needed if you're just dealing with pointers or references to that class, and this can help reduce the needed #include
directives. For example, you could change Game.h and Game.cpp:
QUESTION
I am not getting any sound played when I click the RecyclerView
rows. The sound slips are being implemented in my SecondAdapter
. The SecondAdapter
is an adapter class for my RecyclerView
Activity class.
The Logcat
reflected this when I click the rows:
ANSWER
Answered 2019-Dec-01 at 12:40Try to change your adapter
implementation like below:
QUESTION
I am getting a runtime error: No Value passed for parameter 'soundToInit'
in my SecondAdapter class.
My SecondAdapter is an Adapter to a RecyclerView declared in SecondActivity.
SecondAdapter class:
...ANSWER
Answered 2019-Dec-01 at 10:28Change your Holder like below
QUESTION
I'm trying to create a button that plays sound using SoundPool. The sound is created in another class and i'm trying to access it from my MainActivity as follow:
MainActivity:
...ANSWER
Answered 2019-Dec-01 at 09:01Try to change your implementation like below:
Sound class:
QUESTION
Coding an app using WPF framework in C# (I'm really really new to it, don't be too hard on my coding style). I want some "goodbye" audio to play (using NAudio 1.8.4 reading a stream from a MPQ file) when I exit and not to be interrupted even if the main window disappeared ; for this reason I use a foreground thread in a class called PlayerThread.
I play sounds using the PlayerThread constructor
...ANSWER
Answered 2018-Jan-02 at 15:06Sounds like you need to synchronize your threads where main thread should wait for other thread to finish before exit. Have a look at Thread.Join
: https://msdn.microsoft.com/en-us/library/95hbf2ta(v=vs.110).aspx
QUESTION
I've followed the tutorial along Microsoft's website, and created my own SoundEngine and Sound class structure to have the code abstracted away in main, however whenever I make a call such as batmanWav->play()
, it will only play the audio if I write std::cin.get()
or system("PAUSE")
Why is this? I will be trying to port this to a game that's already been worked on, but I obviously don't want the game to stop every time a sound is played.
EDIT: I was asked to show some code which has the issues
...ANSWER
Answered 2018-Jun-05 at 05:55As someone already noted, the problem is that your application exits before the sound really starts playing. XAudio2 is a non-blocking API, which means that you have to keep the memory live and the audio graph active until the sounds complete playing.
In other words, when you called IXAudio2SourceVoice::Start
, nothing happens except that it logs that you want to start the audio. Another thread which was created as part of your IXAudio2
object then sees the request and begins to process the playback request. By that point, your application has exited and the process terminated unless you 'pause'.
Try something like the following from XAudio2BasicSound
:
QUESTION
I have an android app that outputs sound normally on a phone. I also put it into an android device and can hear audio on tv through HDMI cable. I also have an android things app that moves a servo and can put audio on the tv, also working as expected.
What I can't do is get audio from the audio jack, which would be my preferred option since I want something without a display.
I have lots of logcat entries saying everything is normal and sound is not failing, but other than that I can't rule out if it's an OS capability that's turned off (there's no mention in release notes), something that needs to be tuned into config.txt, whether I need extra lines of code, or it is muted.
I'm assuming audio is not getting to the jack at all. I know that the Raspberry pi 3 b audio jack also carries video, and I've tried to tap into every combination of its pins without success, both using a cable splitter and putting cables on the pins of the connector directly on the board. I'm also assuming that one of the exposed pins under the board carries audio only. Though I'd be grateful if someone could clarify which has left / right channel, even if tested on Raspbian or other OSs.
As seen in following logs, audio focus is ok and SoundPool.play never return 0 (as showin in line that says RESULT === 8
):
ANSWER
Answered 2017-Feb-09 at 18:43As pointed in the Raspberry Pi overlay documentation
2) The onboard analogue audio output uses both PWM channel
So you can't use PWM to drive a servo and play sounds thru the onboard Audio simultaneously.
A few options are possible:
- try the USB audio support announced in Developer Preview 2
- file a feature request to add support for I2S in the Peripheral IO API.
QUESTION
I have piano-like application, and when I'm pressing piano key, it plays a sound. In my app I wrote my own sine wave generator. App is wrote in Qt. I think that problem is with portAudio, but I can't find any solution for this.
I've recorded for you how my problem sounds: https://vocaroo.com/i/s1yiWjaJffTU
And here is my generator class:
soundEngine.h
...ANSWER
Answered 2017-Dec-11 at 18:26MODERATOR ATTENTION: This question seems to belong more to dsp.stackexchange than this forum.
There's nothing wrong with either your sound or PortAudio. The sound you're hearing at the end is just the result of the audio being abruptly stopped. Take a look at the following image of a sound that has a constant amplitude through the entire duration. This sound will have an audible pop at the end.
Conversely, if we attenuate the amplitude by modifying the waveform's envelope (the same sound as in image #1) so that it resembles the sound in image #2, we won't hear any abrupt change(s) in the sound at the end.
In conclusion, if your goal is to completely eliminate the pops that you're hearing, fade out (or fade in) your sound(s).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install soundengine
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page