Home My Page Projects Code Snippets Project Openings 3D graphics for Standard ML
Summary Activity SCM

SCM Repository

[sml3d] View of /trunk/sml3d/src/openal/glue.sml
ViewVC logotype

View of /trunk/sml3d/src/openal/glue.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 879 - (download) (annotate)
Sat May 8 15:59:26 2010 UTC (8 years, 5 months ago) by jhr
File size: 1530 byte(s)
  Working on OpenAL implementation
(* glue.sml
 *
 * COPYRIGHT (c) 2010 John Reppy (http://cs.uchicago.edu/~jhr)
 * All rights reserved.
 *)

structure Glue =
  struct

    local
      open ALTypes
    in

  (* glue constants *)

    val ERROR_NO_ERROR : al_int				= 0
    val ERROR_OUT_OF_MEMORY : al_int			= 0x200
    val ERROR_INVALID_ENUM : al_int			= 0x201
    val ERROR_INVALID_VALUE : al_int			= 0x202
    val ERROR_INVALID_OPERATION : al_int		= 0x203
    val ERROR_NO_CURRENT_CONTEXT : al_int		= 0x204
    val ERROR_AL_ERROR_ON_ENTRY : al_int		= 0x205
    val ERROR_ALC_ERROR_ON_ENTRY : al_int		= 0x206
    val ERROR_OPEN_DEVICE : al_int			= 0x207
    val ERROR_CLOSE_DEVICE : al_int			= 0x208
    val ERROR_CREATE_CONTEXT : al_int			= 0x209
    val ERROR_MAKE_CONTEXT_CURRENT : al_int		= 0x20A
    val ERROR_DESTROY_CONTEXT : al_int			= 0x20B
    val ERROR_GEN_BUFFERS : al_int			= 0x20C
    val ERROR_BUFFER_DATA : al_int			= 0x20D
    val ERROR_IO_ERROR : al_int				= 0x20E
    val ERROR_UNSUPPORTED_FILE_TYPE : al_int		= 0x20F
    val ERROR_UNSUPPORTED_FILE_SUBTYPE : al_int		= 0x210
    val ERROR_CORRUPT_OR_TRUNCATED_DATA : al_int	= 0x211

  (* glue functions *)

    val loadFromFile =
	  _import "SML3D_LoadFromFile"
	    : string
	    * al_int ref	(* [out] for returning size of data *)
	    * al_int ref	(* [out] number of channels *)
	    * al_int ref	(* [out] bits/sample *)
	    * float ref		(* [out] sample frequency *)
	    * al_int ref	(* [out] load status *)
	    -> CPtr.t;		(* returns pointer to data buffer *)

    end (* local *)
  end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0