When reading low level audio from QAudioInput, the resulting data is a QByteArray. When setting up QAudioInput, you can tell it the Sample Type you want from the data. If you specify float there, does that mean the data in QByteArray is already in this format? If it is, do you simply cast the output data to read the float array? If it isn't how is it being stored to get the expected floats out?
getting float array from QAudioInput's qbytearray
569 Views Asked by kevin-lisnr At
1
There are 1 best solutions below
Related Questions in C++
- C++ using std::vector across boundaries
- Linked list without struct
- Connecting Signal QML to C++ (Qt5)
- how to get the reference of struct soap inherited in C++ Proxy/Service class
- Why we can't assign value to pointer
- Conversion of objects in c++
- shared_ptr: "is not a type" error
- C++ template using pointer and non pointer arguments in a QVector
- C++ SFML 2.2 vectors
- Lifetime of temporary objects
- I want to be able to use 4 different variables in a select statement in c ++
- segmentation fault: 11, extracting data in vector
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- How can I print all the values in this linked list inside a hash table?
- Configured TTL for A record(s) backing CNAME records
Related Questions in QT
- C++ template using pointer and non pointer arguments in a QVector
- Using QPointer and QObject::connect with C++11
- qt How to style a QToolBar > QToolButton overflow button?
- Qt - Repeatedly write at beginning of file
- C++ Mongodb driver, not working
- deletion and cleanup of worker thread in Qt crashes
- How to drap item from QTableView to QPushButton?
- get image type from qimage
- C++ QT Getting part from QString
- How to connect a destroyed signal of C++ object from QML?
- How to get shader version from QOpenGLShader?
- Size of Qt QRadioButton able to get smaller, but not larger than default
- error WinSock.h has already been included Boost Windows Qt
- How to call a non-class member function with pointers as parameters with QtConcurrent::run?
- What is the difference between MinGW SEH and MinGW SJLJ?
Related Questions in AUDIO-PROCESSING
- Using OnAudioFilterRead with playOnAwake
- Modulating audio signal with Euterpea
- Visualized frequency from played audio file seems wrong
- Encode raw PCM to AAC using OSX native library
- getting float array from QAudioInput's qbytearray
- FFT which frequencies are in which bins?
- Wav file clipping when playing audio file in MATLAB
- Scipy io read wavfile error
- FFMPEG results in a silent video when trying to combine video and audio tracks
- Acoustic Audio Comparing Library
- variable showing strange value when implementing NLMS algorithm in Android
- How to plot a waveform from wav file in python?
- Scipy spectrogram of .wav file looks violet
- Modulate digital data into audio using AFSK
- How to best determine volume of a signal?
Related Questions in QBYTEARRAY
- After loading a image around 500 times , this error shows in visual studio QImage: out of memory, returning null image
- Better way to strip leading character, new line, cr from QBytearray
- How to convert QVector<double> to QBytearray then display it via QPixmap?
- getting float array from QAudioInput's qbytearray
- How to write a raw QByteArray or manipulate the QByteArray
- QFile: how to efficiently read just bytes from k, to k+L
- Convert hexadecimal string to QByteArray
- QByteArray::append() leads to unexpected QByteArray sizes
- Loading an image onto a graphics view from a byte array
- How to remove first Bytes of QByteArray safely while adding new data continuously end of it?
- Using QSettings with data stored in a QByteArray, or QIODevice?
- converting QBitArray to QByteArray
- quint16 on qbytearray
- Qt send full byte on serial port
- raw bitmap to png in QT
Related Questions in QTMULTIMEDIA
- Unknown module(s) in QT: multimedia
- getting float array from QAudioInput's qbytearray
- Force QMediaPlayer to update position accurately for video scrubbing application?
- Need a help in building (Qt5.1.1)qtmultimedia with gstreamer
- Qt: QCamera + FaceRig (virtual camera). Is it possible?
- QtMultimedia / GStreamer returning "Internal Data Stream Error" in PyQt playing audio
- QMediaPlayer - modify audio on the fly
- Live streaming video in Qt
- Qt 5.2.0 The camera service is missing
- How to get length of a song using Qt 5.1?
- How to play video with qt5
- Running a video with QMediaPlayer : undefined symbol
- Fast Forward,rewind for QAudioOutput
- Unable to loop video using QML MediaPlayer
- Creating a QVideoWidget in Qt5
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
All computer memory is individual bytes, but you can store in those bytes whatever you want. Do not mistake
QByteArrayfor aQVector<char>,QByteArrayis Qt's "generic memory buffer" class.If the recording format is a float, then simply read floats from the byte array, no need to convert, in fact it will give you more samples than you have since floats are bigger than a byte, and you will get garbage.
You can directly get access to the byte array
datapointer and readsize() / sizeof(float)floats from it.