+// Pick a random sound from the buffer and play it into system
+static void sfx_set_playrnd( sfx_set *source, sfx_system *sys, int min_id, int max_id )
+{
+ if( !source->numsegments )
+ return;
+
+ if( max_id > source->numsegments )
+ {
+ vg_error( "Max ID out of range for playrnd\n" );
+ return;
+ }
+
+ int pick = (rand() % (max_id-min_id)) + min_id;
+
+ sfx_set_play( source, sys, pick );
+}
+