audaspace Buffer py method #24618

Closed
opened 2010-11-09 01:37:47 +01:00 by Dan Eicher · 4 comments
Member

%%%This patch is basically just a way to get sound data from python into audaspace without having to hit the file system.

Adds;

aud.Buffer(size)
size = buffer size in bytes

Buffer.resize(size, keep=False)
size = new size in bytes
keep = keep old data

Buffer.fill(source)
source = python object that implements the py_buffer protocol

Buffer.size
size in bytes

Also adds a py_buffer interface for:
buf = aud.Buffer(100)
view = memoryview(buf)

And finally...

Overloads the aud.Factory.init() method so you can pass it either a filename or a Buffer object.
%%%

%%%This patch is basically just a way to get sound data from python into audaspace without having to hit the file system. Adds; aud.Buffer(size) size = buffer size in bytes Buffer.resize(size, keep=False) size = new size in bytes keep = keep old data Buffer.fill(source) source = python object that implements the py_buffer protocol Buffer.size size in bytes Also adds a py_buffer interface for: buf = aud.Buffer(100) view = memoryview(buf) And finally... Overloads the aud.Factory.__init__() method so you can pass it either a filename or a Buffer object. %%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Member

%%%Hmm, I have concerns about thread safety and memory management looking at this patch. So overall I'm sorry, but I'd reject this patch. However, assigning to Campbell, to get his word about it!%%%

%%%Hmm, I have concerns about thread safety and memory management looking at this patch. So overall I'm sorry, but I'd reject this patch. However, assigning to Campbell, to get his word about it!%%%
Member

%%%Sorry, after talking to Campbell, for the reasons stated, I have to close this. There has to be a better way to access sample data with python that is well designed and gets around the flaws python has.%%%

%%%Sorry, after talking to Campbell, for the reasons stated, I have to close this. There has to be a better way to access sample data with python that is well designed and gets around the flaws python has.%%%
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#24618
No description provided.