revert between 56095 -> 55830 in arch
[AROS.git] / workbench / devs / AHI / Device / database.h
blobcf7c6e8e696aba606ec7b9badd33f751efbc220d
1 /*
2 AHI - Hardware independent audio subsystem
3 Copyright (C) 2017 The AROS Dev Team
4 Copyright (C) 1996-2005 Martin Blom <martin@blom.org>
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public
17 License along with this library; if not, write to the
18 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Cambridge,
19 MA 02139, USA.
22 #ifndef ahi_database_h
23 #define ahi_database_h
25 #include <exec/types.h>
26 #include <exec/semaphores.h>
27 #include <exec/lists.h>
29 /* Current implementation of the database (Version 0):
30 Use FreeVec() to free the structure. */
32 #define ADB_NAME "Audio Mode Database"
34 struct AHI_AudioDatabase
36 struct SignalSemaphore ahidb_Semaphore; /* The Semaphore */
37 struct MinList ahidb_AudioModes; /* The Audio Database */
38 UBYTE ahidb_Version; /* Version number (0) */
39 UBYTE ahidb_Name[sizeof(ADB_NAME)]; /* Name */
44 IPTR
45 _AHI_NextAudioID( IPTR id,
46 struct AHIBase* AHIBase );
48 ULONG
49 _AHI_AddAudioMode( struct TagItem* DBtags,
50 struct AHIBase* AHIBase );
52 ULONG
53 _AHI_RemoveAudioMode( IPTR id,
54 struct AHIBase* AHIBase );
56 ULONG
57 _AHI_LoadModeFile( UBYTE* name,
58 struct AHIBase* AHIBase );
60 struct AHI_AudioDatabase*
61 LockDatabase( void );
63 struct AHI_AudioDatabase*
64 LockDatabaseWrite( void );
66 void
67 UnlockDatabase( struct AHI_AudioDatabase* audiodb );
69 struct TagItem*
70 GetDBTagList( struct AHI_AudioDatabase* audiodb,
71 IPTR id );
73 #endif /* ahi_database_h */