commit before merging mimis/base
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@ Release/src
|
|||||||
.gradle
|
.gradle
|
||||||
.settings
|
.settings
|
||||||
build
|
build
|
||||||
|
/cpp/pipe/Release/src
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
copy pipe.dll ..\..\..\java\pipe.dll
|
copy pipe.dll ..\..\..\java\sound\pipe.dll
|
||||||
Binary file not shown.
@@ -1 +1 @@
|
|||||||
copy pipe.dll ..\..\..\java\pipe.dll
|
copy pipe.dll ..\..\..\java\sound\pipe.dll
|
||||||
Binary file not shown.
Binary file not shown.
@@ -5,28 +5,17 @@
|
|||||||
|
|
||||||
#define DEBUG 0
|
#define DEBUG 0
|
||||||
|
|
||||||
JNIEXPORT jint JNICALL Java_pipe_Pipe_CreateNamedPipe
|
JNIEXPORT jint JNICALL Java_pipe_Pipe_CreateNamedPipe(JNIEnv *env,
|
||||||
(
|
jclass className, jstring sPipeName, jint dwOpenMode, jint dwPipeMode,
|
||||||
JNIEnv *env,
|
jint nMaxInstances, jint nOutBufferSize, jint nInBufferSize,
|
||||||
jclass className,
|
jint nDefaultTimeOut, jint lpSecurityAttributes) {
|
||||||
jstring sPipeName,
|
|
||||||
jint dwOpenMode,
|
|
||||||
jint dwPipeMode,
|
|
||||||
jint nMaxInstances,
|
|
||||||
jint nOutBufferSize,
|
|
||||||
jint nInBufferSize,
|
|
||||||
jint nDefaultTimeOut,
|
|
||||||
jint lpSecurityAttributes
|
|
||||||
)
|
|
||||||
{
|
|
||||||
HANDLE pipeHandler;
|
HANDLE pipeHandler;
|
||||||
LPCSTR pipeName;
|
LPCSTR pipeName;
|
||||||
pipeName = (*env)->GetStringUTFChars(env, sPipeName, NULL);
|
pipeName = (*env)->GetStringUTFChars(env, sPipeName, NULL );
|
||||||
if (pipeName == NULL)
|
if (pipeName == NULL )
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (DEBUG)
|
if (DEBUG) {
|
||||||
{
|
|
||||||
printf("Native: Pipe Name %s\n", pipeName);
|
printf("Native: Pipe Name %s\n", pipeName);
|
||||||
printf("Native: dwOpenMode %d\n", dwOpenMode);
|
printf("Native: dwOpenMode %d\n", dwOpenMode);
|
||||||
printf("Native: dwPipeMode %d\n", dwPipeMode);
|
printf("Native: dwPipeMode %d\n", dwPipeMode);
|
||||||
@@ -36,225 +25,166 @@ JNIEXPORT jint JNICALL Java_pipe_Pipe_CreateNamedPipe
|
|||||||
printf("Native: nDefaultTimeOut %d\n", nDefaultTimeOut);
|
printf("Native: nDefaultTimeOut %d\n", nDefaultTimeOut);
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeHandler = CreateNamedPipe((LPCSTR)pipeName, dwOpenMode, dwPipeMode, nMaxInstances, nOutBufferSize, nInBufferSize,
|
pipeHandler = CreateNamedPipe((LPCSTR) pipeName, dwOpenMode, dwPipeMode,
|
||||||
nDefaultTimeOut, (LPSECURITY_ATTRIBUTES) lpSecurityAttributes);
|
nMaxInstances, nOutBufferSize, nInBufferSize, nDefaultTimeOut,
|
||||||
|
(LPSECURITY_ATTRIBUTES) lpSecurityAttributes);
|
||||||
|
|
||||||
(*env)->ReleaseStringUTFChars(env, sPipeName, pipeName);
|
(*env)->ReleaseStringUTFChars(env, sPipeName, pipeName);
|
||||||
return (jint) pipeHandler;
|
return (jint) pipeHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL Java_pipe_Pipe_ConnectNamedPipe
|
JNIEXPORT jboolean JNICALL Java_pipe_Pipe_ConnectNamedPipe(JNIEnv *env,
|
||||||
(
|
jclass className, jint hNamedPipe, jint lpOverlapped) {
|
||||||
JNIEnv *env,
|
|
||||||
jclass className,
|
|
||||||
jint hNamedPipe,
|
|
||||||
jint lpOverlapped
|
|
||||||
)
|
|
||||||
{
|
|
||||||
BOOL fConnected;
|
BOOL fConnected;
|
||||||
HANDLE pipeHandler = (HANDLE) hNamedPipe;
|
HANDLE pipeHandler = (HANDLE) hNamedPipe;
|
||||||
fConnected = ConnectNamedPipe(pipeHandler, (LPOVERLAPPED) lpOverlapped);
|
fConnected = ConnectNamedPipe(pipeHandler, (LPOVERLAPPED) lpOverlapped);
|
||||||
return fConnected;
|
return fConnected;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jint JNICALL Java_pipe_Pipe_GetLastError
|
JNIEXPORT jint JNICALL Java_pipe_Pipe_GetLastError(JNIEnv *env,
|
||||||
(
|
jclass className) {
|
||||||
JNIEnv *env,
|
|
||||||
jclass className
|
|
||||||
)
|
|
||||||
{
|
|
||||||
DWORD errorNumber = GetLastError();
|
DWORD errorNumber = GetLastError();
|
||||||
return (jint) errorNumber;
|
return (jint) errorNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL Java_pipe_Pipe_CloseHandle
|
JNIEXPORT jboolean JNICALL Java_pipe_Pipe_CloseHandle(JNIEnv *env,
|
||||||
(
|
jclass className, jint hNamedPipe) {
|
||||||
JNIEnv *env,
|
|
||||||
jclass className,
|
|
||||||
jint hNamedPipe
|
|
||||||
)
|
|
||||||
{
|
|
||||||
BOOL result;
|
BOOL result;
|
||||||
HANDLE pipeHandler = (HANDLE) hNamedPipe;
|
HANDLE pipeHandler = (HANDLE) hNamedPipe;
|
||||||
result = CloseHandle(pipeHandler);
|
result = CloseHandle(pipeHandler);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jbyteArray JNICALL Java_pipe_Pipe_ReadFile
|
JNIEXPORT jbyteArray JNICALL Java_pipe_Pipe_ReadFile(JNIEnv *env,
|
||||||
(
|
jclass className, jint hNamedPipe, jint nNumberOfBytesToRead) {
|
||||||
JNIEnv *env,
|
|
||||||
jclass className,
|
|
||||||
jint hNamedPipe,
|
|
||||||
jint nNumberOfBytesToRead
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int bytesRead = 0;
|
int bytesRead = 0;
|
||||||
BOOL result;
|
BOOL result;
|
||||||
HANDLE pipeHandler = (HANDLE) hNamedPipe;
|
HANDLE pipeHandler = (HANDLE) hNamedPipe;
|
||||||
LPVOID buffer;
|
LPVOID buffer;
|
||||||
jbyteArray lpBuffer;
|
jbyteArray lpBuffer;
|
||||||
|
|
||||||
buffer = (LPVOID)LocalAlloc(LMEM_ZEROINIT, nNumberOfBytesToRead);
|
buffer = (LPVOID) LocalAlloc(LMEM_ZEROINIT, nNumberOfBytesToRead);
|
||||||
|
|
||||||
if (DEBUG)
|
if (DEBUG) {
|
||||||
{
|
printf(
|
||||||
printf("Native: Before ReadFile pipeHandler %d nNumberOfBytesToRead %d\n", pipeHandler, nNumberOfBytesToRead);
|
"Native: Before ReadFile pipeHandler %d nNumberOfBytesToRead %d\n",
|
||||||
|
pipeHandler, nNumberOfBytesToRead);
|
||||||
}
|
}
|
||||||
result = ReadFile(pipeHandler, (LPVOID) buffer, (DWORD) nNumberOfBytesToRead, &bytesRead, (LPOVERLAPPED) 0);
|
result = ReadFile(pipeHandler, (LPVOID) buffer,
|
||||||
if (result)
|
(DWORD) nNumberOfBytesToRead, &bytesRead, (LPOVERLAPPED) 0);
|
||||||
{
|
if (result) {
|
||||||
lpBuffer = (*env)->NewByteArray(env, (jsize) bytesRead);
|
lpBuffer = (*env)->NewByteArray(env, (jsize) bytesRead);
|
||||||
(*env)->SetByteArrayRegion(env, lpBuffer, 0, (jsize) bytesRead, (jbyte *) buffer);
|
(*env)->SetByteArrayRegion(env, lpBuffer, 0, (jsize) bytesRead,
|
||||||
|
(jbyte *) buffer);
|
||||||
} else
|
} else
|
||||||
bytesRead = 0;
|
bytesRead = 0;
|
||||||
|
|
||||||
LocalFree(buffer);
|
LocalFree(buffer);
|
||||||
|
|
||||||
if (DEBUG)
|
if (DEBUG) {
|
||||||
{
|
|
||||||
printf("Native: After ReadFile BytesRead %d\n", bytesRead);
|
printf("Native: After ReadFile BytesRead %d\n", bytesRead);
|
||||||
}
|
}
|
||||||
return lpBuffer;
|
return lpBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jint JNICALL Java_pipe_Pipe_WriteFile
|
JNIEXPORT jint JNICALL Java_pipe_Pipe_WriteFile(JNIEnv *env, jclass className,
|
||||||
(
|
jint hNamedPipe, jbyteArray lpBuffer, jint nNumberOfBytesToWrite) {
|
||||||
JNIEnv *env,
|
|
||||||
jclass className,
|
|
||||||
jint hNamedPipe,
|
|
||||||
jbyteArray lpBuffer,
|
|
||||||
jint nNumberOfBytesToWrite
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int bytesWritten = 0;
|
int bytesWritten = 0;
|
||||||
BOOL result;
|
BOOL result;
|
||||||
HANDLE pipeHandler = (HANDLE) hNamedPipe;
|
HANDLE pipeHandler = (HANDLE) hNamedPipe;
|
||||||
LPVOID buffer;
|
LPVOID buffer;
|
||||||
|
|
||||||
buffer = (LPVOID)LocalAlloc(LMEM_ZEROINIT, nNumberOfBytesToWrite);
|
buffer = (LPVOID) LocalAlloc(LMEM_ZEROINIT, nNumberOfBytesToWrite);
|
||||||
|
|
||||||
(*env)->GetByteArrayRegion(env, lpBuffer, 0, nNumberOfBytesToWrite, buffer);
|
(*env)->GetByteArrayRegion(env, lpBuffer, 0, nNumberOfBytesToWrite, buffer);
|
||||||
result = WriteFile(pipeHandler, buffer, (DWORD) nNumberOfBytesToWrite, (LPDWORD) &bytesWritten, (LPOVERLAPPED) 0);
|
result = WriteFile(pipeHandler, buffer, (DWORD) nNumberOfBytesToWrite,
|
||||||
|
(LPDWORD) &bytesWritten, (LPOVERLAPPED) 0);
|
||||||
LocalFree(buffer);
|
LocalFree(buffer);
|
||||||
|
|
||||||
if (DEBUG)
|
if (DEBUG) {
|
||||||
{
|
|
||||||
printf("Native: After WriteFile BytesReadWritten %d\n", bytesWritten);
|
printf("Native: After WriteFile BytesReadWritten %d\n", bytesWritten);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!result)
|
if (!result) {
|
||||||
{
|
|
||||||
if (GetLastError() != ERROR_IO_PENDING)
|
if (GetLastError() != ERROR_IO_PENDING)
|
||||||
result = 0;
|
result = 0;
|
||||||
else
|
else
|
||||||
result = 1;
|
result = 1;
|
||||||
}
|
}
|
||||||
if (!result)
|
if (!result) {
|
||||||
{
|
|
||||||
bytesWritten = -1;
|
bytesWritten = -1;
|
||||||
}
|
}
|
||||||
return bytesWritten;
|
return bytesWritten;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL Java_pipe_Pipe_FlushFileBuffers
|
JNIEXPORT jboolean JNICALL Java_pipe_Pipe_FlushFileBuffers(JNIEnv *env,
|
||||||
(
|
jclass className, jint hNamedPipe) {
|
||||||
JNIEnv *env,
|
|
||||||
jclass className,
|
|
||||||
jint hNamedPipe
|
|
||||||
)
|
|
||||||
{
|
|
||||||
BOOL result;
|
BOOL result;
|
||||||
HANDLE pipeHandler = (HANDLE) hNamedPipe;
|
HANDLE pipeHandler = (HANDLE) hNamedPipe;
|
||||||
result = FlushFileBuffers(pipeHandler);
|
result = FlushFileBuffers(pipeHandler);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL Java_pipe_Pipe_DisconnectNamedPipe
|
JNIEXPORT jboolean JNICALL Java_pipe_Pipe_DisconnectNamedPipe(JNIEnv *env,
|
||||||
(
|
jclass className, jint hNamedPipe) {
|
||||||
JNIEnv *env,
|
|
||||||
jclass className,
|
|
||||||
jint hNamedPipe
|
|
||||||
)
|
|
||||||
{
|
|
||||||
BOOL result;
|
BOOL result;
|
||||||
HANDLE pipeHandler = (HANDLE) hNamedPipe;
|
HANDLE pipeHandler = (HANDLE) hNamedPipe;
|
||||||
result = DisconnectNamedPipe(pipeHandler);
|
result = DisconnectNamedPipe(pipeHandler);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jint JNICALL Java_pipe_Pipe_CreateFile
|
JNIEXPORT jint JNICALL Java_pipe_Pipe_CreateFile(JNIEnv *env, jclass className,
|
||||||
(
|
jstring lpFileName, jint dwDesiredAccess, jint dwShareMode,
|
||||||
JNIEnv *env,
|
jint lpSecurityAttributes, jint dwCreationDisposition,
|
||||||
jclass className,
|
jint dwFlagsAndAttributes, jint hTemplateFile) {
|
||||||
jstring lpFileName,
|
|
||||||
jint dwDesiredAccess,
|
|
||||||
jint dwShareMode,
|
|
||||||
jint lpSecurityAttributes,
|
|
||||||
jint dwCreationDisposition,
|
|
||||||
jint dwFlagsAndAttributes,
|
|
||||||
jint hTemplateFile
|
|
||||||
)
|
|
||||||
{
|
|
||||||
HANDLE pipeHandler;
|
HANDLE pipeHandler;
|
||||||
const jbyte *fileName;
|
const jbyte *fileName;
|
||||||
fileName = (*env)->GetStringUTFChars(env, lpFileName, NULL);
|
fileName = (*env)->GetStringUTFChars(env, lpFileName, NULL );
|
||||||
if (fileName == NULL)
|
if (fileName == NULL )
|
||||||
return -1;
|
return -1;
|
||||||
pipeHandler = CreateFile((LPCSTR) fileName, (DWORD) dwDesiredAccess, (DWORD) dwShareMode,
|
pipeHandler = CreateFile((LPCSTR) fileName, (DWORD) dwDesiredAccess,
|
||||||
(LPSECURITY_ATTRIBUTES) lpSecurityAttributes, (DWORD) dwCreationDisposition, (DWORD) dwFlagsAndAttributes, (HANDLE) hTemplateFile);
|
(DWORD) dwShareMode, (LPSECURITY_ATTRIBUTES) lpSecurityAttributes,
|
||||||
|
(DWORD) dwCreationDisposition, (DWORD) dwFlagsAndAttributes,
|
||||||
|
(HANDLE) hTemplateFile);
|
||||||
return (jint) pipeHandler;
|
return (jint) pipeHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL Java_pipe_Pipe_WaitNamedPipe
|
JNIEXPORT jboolean JNICALL Java_pipe_Pipe_WaitNamedPipe(JNIEnv *env,
|
||||||
(
|
jclass className, jstring lpNamedPipeName, jint nTimeOut) {
|
||||||
JNIEnv *env,
|
|
||||||
jclass className,
|
|
||||||
jstring lpNamedPipeName,
|
|
||||||
jint nTimeOut
|
|
||||||
)
|
|
||||||
{
|
|
||||||
BOOL result;
|
BOOL result;
|
||||||
const jbyte *pipeName;
|
const jbyte *pipeName;
|
||||||
pipeName = (*env)->GetStringUTFChars(env, lpNamedPipeName, NULL);
|
pipeName = (*env)->GetStringUTFChars(env, lpNamedPipeName, NULL );
|
||||||
if (pipeName == NULL)
|
if (pipeName == NULL )
|
||||||
return 0;
|
return 0;
|
||||||
result = WaitNamedPipe((LPCSTR) pipeName, (DWORD) nTimeOut);
|
result = WaitNamedPipe((LPCSTR) pipeName, (DWORD) nTimeOut);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jstring JNICALL Java_pipe_Pipe_FormatMessage
|
JNIEXPORT jstring JNICALL Java_pipe_Pipe_FormatMessage(JNIEnv *env,
|
||||||
(
|
jclass className, jint errorCode) {
|
||||||
JNIEnv *env,
|
|
||||||
jclass className,
|
|
||||||
jint errorCode
|
|
||||||
)
|
|
||||||
{
|
|
||||||
LPVOID lpMsgBuf;
|
LPVOID lpMsgBuf;
|
||||||
LPVOID lpDisplayBuf;
|
LPVOID lpDisplayBuf;
|
||||||
DWORD dw = (DWORD) errorCode;
|
DWORD dw = (DWORD) errorCode;
|
||||||
|
|
||||||
FormatMessage(
|
FormatMessage(
|
||||||
FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM
|
||||||
FORMAT_MESSAGE_FROM_SYSTEM |
|
| FORMAT_MESSAGE_IGNORE_INSERTS, NULL, dw,
|
||||||
FORMAT_MESSAGE_IGNORE_INSERTS,
|
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0,
|
||||||
NULL,
|
NULL );
|
||||||
dw,
|
|
||||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
|
||||||
(LPTSTR) &lpMsgBuf,
|
|
||||||
0, NULL );
|
|
||||||
|
|
||||||
lpDisplayBuf = (LPVOID)LocalAlloc(LMEM_ZEROINIT,
|
lpDisplayBuf = (LPVOID) LocalAlloc(LMEM_ZEROINIT,
|
||||||
(lstrlen((LPCTSTR)lpMsgBuf) + 40) * sizeof(TCHAR));
|
(lstrlen((LPCTSTR) lpMsgBuf) + 40) * sizeof(TCHAR));
|
||||||
StringCchPrintf((LPTSTR)lpDisplayBuf, LocalSize(lpDisplayBuf) / sizeof(TCHAR),
|
StringCchPrintf((LPTSTR) lpDisplayBuf,
|
||||||
|
LocalSize(lpDisplayBuf) / sizeof(TCHAR),
|
||||||
TEXT("Failed with error %d: %s"), dw, lpMsgBuf);
|
TEXT("Failed with error %d: %s"), dw, lpMsgBuf);
|
||||||
return (jstring) (*env)->NewStringUTF(env, lpDisplayBuf);
|
return (jstring) (*env)->NewStringUTF(env, lpDisplayBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_pipe_Pipe_Print(JNIEnv *env, jclass className, jstring lpMsgBuf)
|
JNIEXPORT void JNICALL Java_pipe_Pipe_Print(JNIEnv *env, jclass className,
|
||||||
{
|
jstring lpMsgBuf) {
|
||||||
const jbyte *str;
|
const jbyte *str;
|
||||||
str = (*env)->GetStringUTFChars(env, lpMsgBuf, NULL);
|
str = (*env)->GetStringUTFChars(env, lpMsgBuf, NULL );
|
||||||
if (str == NULL)
|
if (str == NULL )
|
||||||
return;
|
return;
|
||||||
printf("Native: %s\n", str);
|
printf("Native: %s\n", str);
|
||||||
(*env)->ReleaseStringUTFChars(env, lpMsgBuf, str);
|
(*env)->ReleaseStringUTFChars(env, lpMsgBuf, str);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" path="src/main/java"/>
|
<classpathentry kind="src" path="src/main/java"/>
|
||||||
|
<classpathentry exported="true" kind="src" path="/java.mimis"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||||
<classpathentry exported="true" kind="con" path="org.springsource.ide.eclipse.gradle.classpathcontainer"/>
|
<classpathentry exported="true" kind="con" path="org.springsource.ide.eclipse.gradle.classpathcontainer"/>
|
||||||
<classpathentry combineaccessrules="false" kind="src" path="/mimis"/>
|
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|||||||
Binary file not shown.
@@ -8,9 +8,9 @@ import java.io.OutputStream;
|
|||||||
|
|
||||||
import javazoom.jl.decoder.Bitstream;
|
import javazoom.jl.decoder.Bitstream;
|
||||||
import javazoom.jl.decoder.BitstreamException;
|
import javazoom.jl.decoder.BitstreamException;
|
||||||
import mimis.exception.worker.ActivateException;
|
import base.exception.worker.ActivateException;
|
||||||
import mimis.exception.worker.DeactivateException;
|
import base.exception.worker.DeactivateException;
|
||||||
import mimis.worker.Worker;
|
import base.worker.Worker;
|
||||||
|
|
||||||
import com.Ostermiller.util.CircularByteBuffer;
|
import com.Ostermiller.util.CircularByteBuffer;
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import java.io.OutputStream;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
|
||||||
import mimis.exception.worker.ActivateException;
|
import base.exception.worker.ActivateException;
|
||||||
import mimis.worker.Worker;
|
import base.worker.Worker;
|
||||||
|
|
||||||
import com.Ostermiller.util.BufferOverflowException;
|
import com.Ostermiller.util.BufferOverflowException;
|
||||||
import com.Ostermiller.util.CircularByteBuffer;
|
import com.Ostermiller.util.CircularByteBuffer;
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import java.io.FileInputStream;
|
|||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import mimis.exception.worker.ActivateException;
|
|
||||||
|
|
||||||
import org.farng.mp3.MP3File;
|
import org.farng.mp3.MP3File;
|
||||||
import org.farng.mp3.TagException;
|
import org.farng.mp3.TagException;
|
||||||
|
|
||||||
|
import base.exception.worker.ActivateException;
|
||||||
|
|
||||||
public class Mp3 extends Converter {
|
public class Mp3 extends Converter {
|
||||||
protected File file;
|
protected File file;
|
||||||
protected String title;
|
protected String title;
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import java.io.OutputStream;
|
|||||||
|
|
||||||
import javax.sound.sampled.AudioFormat;
|
import javax.sound.sampled.AudioFormat;
|
||||||
|
|
||||||
import mimis.exception.worker.ActivateException;
|
import base.exception.worker.ActivateException;
|
||||||
import mimis.exception.worker.DeactivateException;
|
import base.exception.worker.DeactivateException;
|
||||||
import mimis.worker.Worker;
|
import base.worker.Worker;
|
||||||
import sound.Format.Standard;
|
import sound.Format.Standard;
|
||||||
import sound.SoxBuilder.File;
|
import sound.SoxBuilder.File;
|
||||||
import sound.SoxBuilder.File.Type;
|
import sound.SoxBuilder.File.Type;
|
||||||
|
|||||||
@@ -9,13 +9,14 @@ import javax.sound.sampled.SourceDataLine;
|
|||||||
|
|
||||||
import javazoom.jl.decoder.JavaLayerException;
|
import javazoom.jl.decoder.JavaLayerException;
|
||||||
import javazoom.jl.player.Player;
|
import javazoom.jl.player.Player;
|
||||||
import mimis.exception.worker.ActivateException;
|
|
||||||
import mimis.exception.worker.DeactivateException;
|
|
||||||
import mimis.worker.Worker;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import base.exception.worker.ActivateException;
|
||||||
|
import base.exception.worker.DeactivateException;
|
||||||
|
import base.worker.Worker;
|
||||||
|
|
||||||
public class Source implements Consumer {
|
public class Source implements Consumer {
|
||||||
protected Logger logger = LoggerFactory.getLogger(getClass());
|
protected Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import java.io.OutputStreamWriter;
|
|||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
import mimis.exception.worker.ActivateException;
|
import base.exception.worker.ActivateException;
|
||||||
import mimis.exception.worker.DeactivateException;
|
import base.exception.worker.DeactivateException;
|
||||||
import mimis.worker.Worker;
|
import base.worker.Worker;
|
||||||
|
|
||||||
import com.Ostermiller.util.CircularByteBuffer;
|
import com.Ostermiller.util.CircularByteBuffer;
|
||||||
import com.Ostermiller.util.CircularObjectBuffer;
|
import com.Ostermiller.util.CircularObjectBuffer;
|
||||||
|
|||||||
Reference in New Issue
Block a user