+#define AUDIO_EDIT_SAMPLING_RATE 0x80
+
+static void audio_channel_init( audio_channel *ch, audio_clip *clip, u32 flags )
+{
+ ch->group = 0;
+ ch->world_id = 0;
+ ch->source = clip;
+ ch->flags = flags;
+ ch->colour = 0x00333333;
+
+ if( (ch->source->flags & AUDIO_FLAG_FORMAT) == k_audio_format_bird )
+ strcpy( ch->name, "[array]" );
+ else
+ vg_strncpy( clip->path, ch->name, 32, k_strncpy_always_add_null );
+
+ ch->allocated = 1;
+
+ ch->editable_state.relinquished = 0;
+ ch->editable_state.volume = 1.0f;
+ ch->editable_state.volume_target = 1.0f;
+ ch->editable_state.pan = 0.0f;
+ ch->editable_state.pan_target = 0.0f;
+ ch->editable_state.volume_rate = 0;
+ ch->editable_state.pan_rate = 0;
+ v4_copy((v4f){0.0f,0.0f,0.0f,1.0f},ch->editable_state.spacial_falloff);
+ ch->editable_state.lfo = NULL;
+ ch->editable_state.lfo_amount = 0.0f;
+ ch->editable_state.sampling_rate = 1.0f;
+ ch->editble_state_write_mask = 0x00;
+}
+
+static void audio_channel_group( audio_channel *ch, u16 group )
+{
+ ch->group = group;
+ ch->colour = (((u32)group * 29986577) & 0x00ffffff) | 0xff000000;
+}