Re: [AD] Documentation update

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2005-06-05, Grzegorz Adam Hankiewicz <gradha@xxxxxxxxxx> wrote:
> Attached proposed documentation update.

> Index: docs/src/allegro._tx
> ===================================================================
> RCS file: /cvsroot/alleg/allegro/docs/src/allegro._tx,v
> retrieving revision 1.337

Nice.

> diff -u -p -r1.337 allegro._tx
> --- docs/src/allegro._tx	3 Jun 2005 16:39:31 -0000	1.337
> +++ docs/src/allegro._tx	5 Jun 2005 13:38:47 -0000
> @@ -814,11 +814,14 @@ available in past/future versions of All
>     unsigned long len;          - length (in samples)
>     unsigned long loop_start;   - loop start position
>     unsigned long loop_end;     - loop finish position
> +   void *data;                 - raw sample data
>  <endblock>
>     A sample structure, which holds sound data, used by the digital sample
>     routines. You can consider all of these fields as read only except
>     priority, loop_start and loop_end, which you can change them for example
> -   after loading a sample from disk.
> +   after loading a sample from disk. If you are creating your own samples on
> +   the fly, you might also want to modify the raw data of the sample pointed
> +   by the data field.

Is the sample format documented anywhere? (I didn't check)

> +@retval
> +   Returns the maximum number of voices that the driver can provide, or zero
> +   if the hardware is not present.
> +
> +   There are two special-case return values that you should watch out for:
> +   if this function returns -1 it is a note-stealing driver (eg. DIGMID) that
> +   shares voices with the current digital sound driver, and if it returns
> +   0xFFFF it is an external device like an MPU-401 where there is no way to
> +   determine how many voices are available.

OMG!

>  @@void @reserve_voices(int digi_voices, int midi_voices);
>  @xref set_volume_per_voice, install_sound, detect_digi_driver
...
> @@ -8682,18 +8692,19 @@ drivers.
>  @shortdesc Alters the global sound output volume.
>     Alters the global sound output volume. Specify volumes for both digital 
>     samples and MIDI playback, as integers from 0 to 255, or pass a negative 
> -   value to leave one of the settings unchanged. This routine will not alter
> -   the volume of the hardware mixer if it exists (i.e. only your application
> -   will be affected).
> +   value to leave one of the settings unchanged. Values bigger than 255 will
> +   be reduced to 255.

Do we want users to be able to rely on this?

>  @@void @set_hardware_volume(int digi_volume, int midi_volume);
>  @xref install_sound, set_volume
>  @shortdesc Alters the hardware sound output volume.
>     Alters the hardware sound output volume. Specify volumes for both digital 
>     samples and MIDI playback, as integers from 0 to 255, or pass a negative 
> -   value to leave one of the settings unchanged. This routine will use the
> -   hardware mixer to control the volume if it exists (i.e. the volume of all
> -   the applications on your machine will be affected), otherwise do nothing.
> +   value to leave one of the settings unchanged. Values bigger than 255 will
> +   be reduced to 255.

Same deal, although I suppose this one is more okay.

Peter





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/