Comments (7)
It seems like the GenericSound.stream
function should do that? Altough it never assigns the data?
from dlib.
It seems like in order to write the data in the stream function, this should be reversed;
buffer[i] = _data[i];
I might be wrong
from dlib.
Nevermind that actually won't fix it
from dlib.
GenericSound.dup()
does exactly that.
Or use copy constructor new GenericSound(snd);
, which is the same.
What stream
does is filling the fixed-size buffer with a portion of raw sound data, which is useful to send it to audio playback API.
from dlib.
That wasn't what I was trying to do. Altough I got this to work for me:
foreach (i; 0 .. originalSound.size)
{
newSound[0, i] = originalSound[1, i];
}
The snippet is from https://github.com/AODQ/aoynthesizer/blob/master/source/app.d
from dlib.
Oh I see. If you want to copy data to another channel, or to another sample format, then yes, that is the only way to do it.
from dlib.
Alright. Thanks. I thought stream was the function to do so, altough I was mistaken. The wiki for the audio module could probably use an example or 2.
Anyway thanks for your help! I'll close the issue as it's been resolved
from dlib.
Related Issues (20)
- Quaternion!T.rotationAxis is incorrect.
- Iterating over dictionary HOT 1
- Make dlib entirely GC-free
- dlib error messages on dub build HOT 3
- HTTP client HOT 1
- DMD 2.088.0 deprecations
- dlib.text.unmanagedstring.String should be always null-terminated
- Rendering text on canvas HOT 1
- Thread synchronization HOT 1
- Unable to build a project with the dlib dependency HOT 2
- Get rid of toStringz in dlib.filesystem.stdfs
- Build error on Windows HOT 1
- Base64 to image HOT 2
- linker error with BigInt.toHash() HOT 4
- image.d(288): Range violation HOT 2
- Increase coverage
- File-based image decoding functions should use ArrayStream internally
- Can't open jpg images with "Progressive DCT, Huffman coding" encoding HOT 1
- 1D and 3D textures support
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 dlib.