summaryrefslogtreecommitdiff
path: root/songdbj/org/tritonus/lowlevel/ogg/Ogg.java
diff options
context:
space:
mode:
Diffstat (limited to 'songdbj/org/tritonus/lowlevel/ogg/Ogg.java')
-rw-r--r--songdbj/org/tritonus/lowlevel/ogg/Ogg.java104
1 files changed, 0 insertions, 104 deletions
diff --git a/songdbj/org/tritonus/lowlevel/ogg/Ogg.java b/songdbj/org/tritonus/lowlevel/ogg/Ogg.java
deleted file mode 100644
index 1ad6bde789..0000000000
--- a/songdbj/org/tritonus/lowlevel/ogg/Ogg.java
+++ /dev/null
@@ -1,104 +0,0 @@
1/*
2 * Ogg.java
3 *
4 * This file is part of Tritonus: http://www.tritonus.org/
5 */
6
7/*
8 * Copyright (c) 2000 - 2001 by Matthias Pfisterer
9 *
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU Library General Public License as published
13 * by the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Library General Public License for more details.
20 *
21 * You should have received a copy of the GNU Library General Public
22 * License along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 *
25 */
26
27/*
28|<--- this code is formatted to fit into 80 columns --->|
29*/
30
31package org.tritonus.lowlevel.ogg;
32
33import org.tritonus.share.TDebug;
34
35
36/** libogg loading.
37 */
38public class Ogg
39{
40 private static boolean sm_bIsLibraryAvailable = false;
41
42
43
44 static
45 {
46 Ogg.loadNativeLibrary();
47 }
48
49
50
51 public static void loadNativeLibrary()
52 {
53 if (TDebug.TraceOggNative) { TDebug.out("Ogg.loadNativeLibrary(): begin"); }
54
55 if (! isLibraryAvailable())
56 {
57 loadNativeLibraryImpl();
58 }
59 if (TDebug.TraceOggNative) { TDebug.out("Ogg.loadNativeLibrary(): end"); }
60 }
61
62
63
64 /** Load the native library for ogg vorbis.
65
66 This method actually does the loading of the library. Unlike
67 {@link loadNativeLibrary() loadNativeLibrary()}, it does not
68 check if the library is already loaded.
69
70 */
71 private static void loadNativeLibraryImpl()
72 {
73 if (TDebug.TraceOggNative) { TDebug.out("Ogg.loadNativeLibraryImpl(): loading native library tritonusvorbis"); }
74 try
75 {
76 System.loadLibrary("tritonusvorbis");
77 // only reached if no exception occures
78 sm_bIsLibraryAvailable = true;
79 }
80 catch (Error e)
81 {
82 if (TDebug.TraceOggNative ||
83 TDebug.TraceAllExceptions)
84 {
85 TDebug.out(e);
86 }
87 // throw e;
88 }
89 if (TDebug.TraceOggNative) { TDebug.out("Ogg.loadNativeLibraryImpl(): loaded"); }
90 }
91
92
93
94 /** Returns whether the libraries are installed correctly.
95 */
96 public static boolean isLibraryAvailable()
97 {
98 return sm_bIsLibraryAvailable;
99 }
100}
101
102
103
104/*** Ogg.java ***/