/* -*-c-*-
*
- * $Id: au.h,v 1.1 2002/02/02 19:16:28 mdw Exp $
+ * $Id: au.h,v 1.2 2002/02/02 22:43:50 mdw Exp $
*
* Audio handling
*
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: au.h,v $
- * Revision 1.1 2002/02/02 19:16:28 mdw
- * New audio subsystem.
- *
- */
-
#ifndef AU_H
#define AU_H
size_t sz; /* Size of sample file data */
} au_data;
-#define AU_CACHEMAX 0x01000000 /* Maximum resident sample data */
+/* --- Audio cache information --- */
+
+typedef struct au_cacheinfo {
+ size_t sz_max; /* Maximum allowed cache size */
+ size_t sz_total; /* Total size used by samples */
+ size_t sz_spare; /* Size used by `spare' samples */
+ size_t sz_queue; /* Size used by queued samples */
+ unsigned n_total; /* Total number of cached samples */
+ unsigned n_spare; /* Number of `spare' samples */
+ unsigned n_queue; /* Number of queued samples */
+ unsigned long hits; /* Number of cache hits */
+ unsigned long misses; /* Number of cache misses */
+} au_cacheinfo;
+
+#define AU_CACHEMAX 0x01000000 /* Default cache maximum size */
/*----- Functions provided ------------------------------------------------*/
extern void au_shutdown(void);
+/* --- @au_getcacheinfo@ --- *
+ *
+ * Arguments: @au_cacheinfo *c@ = where to put the information
+ *
+ * Returns: ---
+ *
+ * Use: Extracts audio cache information.
+ */
+
+extern void au_getcacheinfo(au_cacheinfo */*c*/);
+
+/* --- @au_setcachelimit@ --- *
+ *
+ * Arguments: @size_t max@ = new cache limit
+ *
+ * Returns: ---
+ *
+ * Use: Reconfigures the maximum cache size. This probably isn't
+ * very useful, but it was easy...
+ */
+
+extern void au_setcachelimit(size_t /*max*/);
+
/* --- @au_find@ --- *
*
* Arguments: @const char *tag@ = sample tag string