Comments (2)
The convertBuffer() function is general to the various data types and should not be modified to address a problem with a specific API. The Int24 data type is a class (defined in RtAudio.h) that support 24-bit data and provides functions to convert to other different types.
But if there is a problem with the support for ALSA 24-bit data, it should be fixed in the ALSA API section of the RtAudio code. That could potentially involve not using the Int24 data type at all and instead just calling the convertBuffer() function for 32-bit data. I wonβt have time to look into this for a while.
On Aug 22, 2016, at 6:44 AM, knell [email protected] wrote:
For 24 bit sample format ALSA uses full 32 bit word and takes only 24 bits of data. In the convertBuffer() you use S24 pointer to iterate buffer and it's wrong for ALSA. For example, lines 9827-9838, there is:
Int24 *in = (Int24 *)inBuffer;
for ALSA you will take only three bytes from input buffer but you should take 4, like this:
Int32 *in = (Int32 *)inBuffer;
and later convert a value to Int24 to extract an integer.
The same in the line 9943, there is:
Int24 *out = (Int24 *)outBuffer;
so you will write 3 bytes of output but for ALSA it should be four. Now it writes only 3/4 of the buffer and the last 1/4 remains untouched. Actually it would be good to memset a buffer with 0 after calloc().Also, there is no support of big endian formats (in S24 for example) but it should be like 'feature request', not a bug.
β
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #74, or mute the thread https://github.com/notifications/unsubscribe-auth/AFOBpaF5zgN-Zui5lyHcDACnY7JePmV2ks5qiX2agaJpZM4JpvA9.{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/thestk/rtaudio","title":"thestk/rtaudio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/thestk/rtaudio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"convertBuffer() is wrong for S24 and ALSA (#74)"}],"action":{"name":"View Issue","url":"https://github.com/thestk/rtaudio/issues/74"}}}
from rtaudio.
No follow-up ... assuming it was not a bug.
from rtaudio.
Related Issues (20)
- [ask question] Pass sample rate and channel count to the callback. HOT 1
- [question] Is blocking playback no longer supported? HOT 2
- Separate backend in different headers HOT 1
- Examples are not starting on Windows HOT 3
- Remove unnecessary null pointer checks HOT 1
- Complete build options for Pthread API HOT 5
- Completion of error handling HOT 1
- Example request - Mono to Stereo HOT 2
- Understanding duplex mode with different sample rates (if possible) HOT 2
- PulseAPI hang ups on 5.2.0 when used repeatedly from a child thread HOT 3
- MacOS: Bluetooth devices change channel count during usage. HOT 1
- clarification on behavior of functions HOT 6
- Airplay from MacOS to AppleTV, RTAUDIO_SYSTEM_ERROR 10 HOT 2
- Stream recording on PulseAudio starts before startStream being called HOT 4
- Question: Is it possible to get the audio data of the outputDevice HOT 2
- Tests fail to compile HOT 2
- meson build fails with non-matching version number HOT 3
- soname version bump for RtAudio-6.0.0 HOT 2
- Missing symbols in version >= 6 HOT 7
- Undefined Reference to pthread_mutex_* in MinGW since 6.0.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rtaudio.