xaudio2's picture

SoundData class

Project:The Open Toolkit library
Version:0.9.1
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:by design
Description

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.


Comments

Comment viewing options

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

#1

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

#2

Status:open» by design

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