xaudio2's picture

SoundData class

Project:The Open Toolkit library
Category:feature request
Status:by design

I would propose to add public constructor:

public SoundData(SoundFormat format)
this.SoundFormat = format;
this.buffer = null;

and modify properties:
public byte[] Data { get { return buffer; } set { buffer = value; } }
public SoundFormat SoundFormat { get { return format; } set { format = value; } }

I am explaining why:
If I would like to take advantage of the method AL.BufferData(buffer, SoundData) at present I can not.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Inertia's picture


It appears that instances are immutable by design, because it would be very easy to break the instance if you would only change format _or_ the buffer. Creating another instance is cheap, what are you doing exactly that prevents you from using the class?

the Fiddler's picture


Status:open» by design

This is by design. The SoundData class will be revisited in the future.