alsa.audio: limit the supported frequencies to common set
[AROS.git] / workbench / libs / datatypes / releasedatatype.c
blob62da44ac68f26a0bf3f594f1b6e85396865487e5
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include "datatypes_intern.h"
10 #include <proto/exec.h>
11 #include <exec/alerts.h>
13 /*****************************************************************************
15 NAME */
16 #include <proto/datatypes.h>
18 AROS_LH1(VOID, ReleaseDataType,
20 /* SYNOPSIS */
21 AROS_LHA(struct DataType *, dt, A0),
23 /* LOCATION */
24 struct Library *, DataTypesBase, 7, DataTypes)
26 /* FUNCTION
28 Release a DataType structure aquired by ObtainDataTypeA().
30 INPUTS
32 dt -- DataType structure as returned by ObtainDataTypeA(); NULL is
33 a valid input.
35 RESULT
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
45 ObtainDataTypeA()
47 INTERNALS
49 HISTORY
51 *****************************************************************************/
53 AROS_LIBFUNC_INIT
55 ObtainSemaphoreShared(&(GPB(DataTypesBase)->dtb_DTList)->dtl_Lock);
57 if(dt != NULL)
59 if(((struct CompoundDataType *)dt)->OpenCount)
60 ((struct CompoundDataType*)dt)->OpenCount--;
61 else
62 Alert(AN_Unknown);
65 ReleaseSemaphore(&(GPB(DataTypesBase)->dtb_DTList)->dtl_Lock);
67 AROS_LIBFUNC_EXIT
68 } /* ReleaseDataType */