├── .classpath ├── .gitignore ├── .project ├── .settings ├── org.eclipse.core.resources.prefs └── org.eclipse.jdt.core.prefs ├── LICENSE ├── README.md └── source ├── de └── quippy │ ├── javamod │ ├── io │ │ ├── FileOrPackedInputStream.java │ │ ├── GaplessSoundOutputStreamImpl.java │ │ ├── HttpResource.java │ │ ├── ModfileInputStream.java │ │ ├── PowerPackerFile.java │ │ ├── RandomAccessInputStream.java │ │ ├── RandomAccessInputStreamImpl.java │ │ ├── SoundOutputStream.java │ │ ├── SoundOutputStreamImpl.java │ │ ├── XpkSqsh.java │ │ └── wav │ │ │ ├── RMIFile.java │ │ │ ├── RiffFile.java │ │ │ └── WaveFile.java │ ├── main │ │ ├── CommandLine.java │ │ ├── JavaMod.java │ │ ├── JavaModMainBase.java │ │ ├── gui │ │ │ ├── EffectsPanel.java │ │ │ ├── JavaModAbout.java │ │ │ ├── MainForm.java │ │ │ ├── PlayThread.java │ │ │ ├── PlayThreadEventListener.java │ │ │ ├── PlayerConfigPanel.java │ │ │ ├── SimpleTextViewerDialog.java │ │ │ ├── UrlDialog.java │ │ │ ├── XmasConfigPanel.java │ │ │ ├── XmasScreenConfigPanel.java │ │ │ ├── components │ │ │ │ ├── DoubleProgressDialog.java │ │ │ │ ├── FixedStateCheckBox.java │ │ │ │ ├── LEDScrollPanel.java │ │ │ │ ├── MeterPanelBase.java │ │ │ │ ├── ProgressDialog.java │ │ │ │ ├── RoundSlider.java │ │ │ │ ├── SAMeterPanel.java │ │ │ │ ├── SeekBarPanel.java │ │ │ │ ├── SeekBarPanelListener.java │ │ │ │ ├── SimpleProgressDialog.java │ │ │ │ ├── ThreadUpdatePanel.java │ │ │ │ ├── VUMeterPanel.java │ │ │ │ └── XmasDecorationPanel.java │ │ │ ├── playlist │ │ │ │ ├── EditPlaylistEntry.java │ │ │ │ ├── PlayListGUI.java │ │ │ │ └── PlaylistGUIChangeListener.java │ │ │ ├── ressources │ │ │ │ ├── lightbulbs │ │ │ │ │ ├── 0.gif │ │ │ │ │ ├── 1.gif │ │ │ │ │ ├── 10.gif │ │ │ │ │ ├── 11.gif │ │ │ │ │ ├── 12.gif │ │ │ │ │ ├── 13.gif │ │ │ │ │ ├── 14.gif │ │ │ │ │ ├── 2.gif │ │ │ │ │ ├── 3.gif │ │ │ │ │ ├── 4.gif │ │ │ │ │ ├── 5.gif │ │ │ │ │ ├── 6.gif │ │ │ │ │ ├── 7.gif │ │ │ │ │ ├── 8.gif │ │ │ │ │ └── 9.gif │ │ │ │ ├── lucon.ttf │ │ │ │ ├── next.gif │ │ │ │ ├── next_aktiv.gif │ │ │ │ ├── next_normal.gif │ │ │ │ ├── pause.gif │ │ │ │ ├── pause_aktiv.gif │ │ │ │ ├── pause_normal.gif │ │ │ │ ├── play.gif │ │ │ │ ├── play_aktiv.gif │ │ │ │ ├── play_normal.gif │ │ │ │ ├── prev.gif │ │ │ │ ├── prev_aktiv.gif │ │ │ │ ├── prev_normal.gif │ │ │ │ ├── quippy_the_kangaroo_about.gif │ │ │ │ ├── repeat.gif │ │ │ │ ├── repeat_active.gif │ │ │ │ ├── repeat_normal.gif │ │ │ │ ├── save.gif │ │ │ │ ├── shuffle.gif │ │ │ │ ├── stop.gif │ │ │ │ ├── stop_aktiv.gif │ │ │ │ └── stop_normal.gif │ │ │ └── tools │ │ │ │ ├── FileChooserFilter.java │ │ │ │ ├── FileChooserResult.java │ │ │ │ ├── PlaylistDropListener.java │ │ │ │ └── PlaylistDropListenerCallBack.java │ │ └── playlist │ │ │ ├── PlayList.java │ │ │ ├── PlayListEntry.java │ │ │ ├── PlaylistChangedListener.java │ │ │ └── cuesheet │ │ │ ├── CueFile.java │ │ │ ├── CueIndex.java │ │ │ ├── CueSheet.java │ │ │ └── CueTrack.java │ ├── mixer │ │ ├── BasicMixer.java │ │ ├── Mixer.java │ │ └── dsp │ │ │ ├── AudioProcessor.java │ │ │ ├── DSPEffekt.java │ │ │ ├── DspProcessorCallBack.java │ │ │ ├── FFT.java │ │ │ ├── FFT2.java │ │ │ ├── iir │ │ │ ├── GraphicEQ.java │ │ │ ├── GraphicEqGUI.java │ │ │ └── filter │ │ │ │ ├── Dither.java │ │ │ │ ├── IIRBandpassFilter.java │ │ │ │ ├── IIRFilter.java │ │ │ │ ├── IIRFilterBase.java │ │ │ │ ├── IIRHighpassFilter.java │ │ │ │ └── IIRLowpassFilter.java │ │ │ └── pitchshift │ │ │ ├── PitchShift.java │ │ │ └── PitchShiftGUI.java │ ├── multimedia │ │ ├── MultimediaContainer.java │ │ ├── MultimediaContainerEvent.java │ │ ├── MultimediaContainerEventListener.java │ │ ├── MultimediaContainerManager.java │ │ ├── ape │ │ │ ├── APEContainer.java │ │ │ ├── APEInfoPanel.java │ │ │ └── APEMixer.java │ │ ├── flac │ │ │ ├── FLACContainer.java │ │ │ ├── FLACInfoPanel.java │ │ │ └── FLACMixer.java │ │ ├── midi │ │ │ ├── MidiConfigPanel.java │ │ │ ├── MidiContainer.java │ │ │ ├── MidiInfoPanel.java │ │ │ └── MidiMixer.java │ │ ├── mod │ │ │ ├── ModConfigPanel.java │ │ │ ├── ModConstants.java │ │ │ ├── ModContainer.java │ │ │ ├── ModDSP.java │ │ │ ├── ModInfoPanel.java │ │ │ ├── ModMixer.java │ │ │ ├── gui │ │ │ │ ├── EnvelopeImagePanel.java │ │ │ │ ├── EnvelopePanel.java │ │ │ │ ├── ModInstrumentDialog.java │ │ │ │ ├── ModPatternDialog.java │ │ │ │ ├── ModSampleDialog.java │ │ │ │ ├── ModUpdateListener.java │ │ │ │ ├── PatternImagePanel.java │ │ │ │ ├── PatternImagePosition.java │ │ │ │ ├── SampleImagePanel.java │ │ │ │ └── SongUpdater.java │ │ │ ├── loader │ │ │ │ ├── Module.java │ │ │ │ ├── ModuleFactory.java │ │ │ │ ├── instrument │ │ │ │ │ ├── Envelope.java │ │ │ │ │ ├── Instrument.java │ │ │ │ │ ├── InstrumentsContainer.java │ │ │ │ │ └── Sample.java │ │ │ │ ├── pattern │ │ │ │ │ ├── Pattern.java │ │ │ │ │ ├── PatternContainer.java │ │ │ │ │ ├── PatternElement.java │ │ │ │ │ ├── PatternElementIT.java │ │ │ │ │ ├── PatternElementXM.java │ │ │ │ │ └── PatternRow.java │ │ │ │ └── tracker │ │ │ │ │ ├── FarandoleTrackerMod.java │ │ │ │ │ ├── ImpulseTrackerMod.java │ │ │ │ │ ├── MultiTrackerMod.java │ │ │ │ │ ├── ProTrackerMod.java │ │ │ │ │ ├── ScreamTrackerMod.java │ │ │ │ │ ├── ScreamTrackerOldMod.java │ │ │ │ │ ├── ScreamTrackerSTXMod.java │ │ │ │ │ └── XMMod.java │ │ │ ├── midi │ │ │ │ └── MidiMacros.java │ │ │ └── mixer │ │ │ │ ├── BasicModMixer.java │ │ │ │ ├── ProTrackerMixer.java │ │ │ │ ├── SampleInstrumentPlayer.java │ │ │ │ ├── ScreamTrackerMixer.java │ │ │ │ └── interpolation │ │ │ │ ├── CubicSpline.java │ │ │ │ ├── Kaiser.java │ │ │ │ └── WindowedFIR.java │ │ ├── mp3 │ │ │ ├── MP3Container.java │ │ │ ├── MP3InfoPanel.java │ │ │ ├── MP3Mixer.java │ │ │ ├── MP3StreamInfoPanel.java │ │ │ ├── id3 │ │ │ │ ├── ID3v1Tag.java │ │ │ │ ├── ID3v2ExtendedHeader.java │ │ │ │ ├── ID3v2Footer.java │ │ │ │ ├── ID3v2Frame.java │ │ │ │ ├── ID3v2Frames.java │ │ │ │ ├── ID3v2Header.java │ │ │ │ ├── ID3v2Tag.java │ │ │ │ ├── MP3FileID3Controller.java │ │ │ │ ├── MPEGAudioFrameHeader.java │ │ │ │ ├── NullsoftID3GenreTable.java │ │ │ │ └── exceptions │ │ │ │ │ ├── ID3FieldDataException.java │ │ │ │ │ ├── ID3v2FormatException.java │ │ │ │ │ └── NoMPEGFramesException.java │ │ │ └── streaming │ │ │ │ ├── IcyInputStream.java │ │ │ │ ├── IcyTag.java │ │ │ │ ├── TagParseEvent.java │ │ │ │ └── TagParseListener.java │ │ ├── ogg │ │ │ ├── OGGContainer.java │ │ │ ├── OGGInfoPanel.java │ │ │ ├── OGGMixer.java │ │ │ └── metadata │ │ │ │ ├── JOrbisComment.java │ │ │ │ └── OggMetaData.java │ │ ├── opl3 │ │ │ ├── OPL3ConfigPanel.java │ │ │ ├── OPL3Container.java │ │ │ ├── OPL3InfoPanel.java │ │ │ ├── OPL3Mixer.java │ │ │ ├── emu │ │ │ │ ├── EmuFMOPL_072.java │ │ │ │ ├── EmuOPL.java │ │ │ │ └── EmuOPL3.java │ │ │ └── sequencer │ │ │ │ ├── DROSequence.java │ │ │ │ ├── MIDSequence.java │ │ │ │ ├── OPL3Sequence.java │ │ │ │ └── ROLSequence.java │ │ ├── sid │ │ │ ├── SIDConfigPanel.java │ │ │ ├── SIDContainer.java │ │ │ ├── SIDInfoPanel.java │ │ │ └── SIDMixer.java │ │ └── wav │ │ │ ├── WavContainer.java │ │ │ ├── WavInfoPanel.java │ │ │ └── WavMixer.java │ └── system │ │ ├── CircularBuffer.java │ │ ├── FastMath.java │ │ ├── Helpers.java │ │ ├── Log.java │ │ ├── LogMessageCallBack.java │ │ └── StringUtils.java │ ├── jflac │ ├── ChannelData.java │ ├── Constants.java │ ├── FLACDecoder.java │ ├── FixedPredictor.java │ ├── FrameDecodeException.java │ ├── FrameListener.java │ ├── FrameListeners.java │ ├── LPCPredictor.java │ ├── PCMProcessor.java │ ├── PCMProcessors.java │ ├── frame │ │ ├── BadHeaderException.java │ │ ├── Channel.java │ │ ├── ChannelConstant.java │ │ ├── ChannelFixed.java │ │ ├── ChannelLPC.java │ │ ├── ChannelVerbatim.java │ │ ├── EntropyCodingMethod.java │ │ ├── EntropyPartitionedRice.java │ │ ├── EntropyPartitionedRiceContents.java │ │ ├── Frame.java │ │ └── Header.java │ ├── io │ │ ├── BitInputStream.java │ │ ├── BitOutputStream.java │ │ └── RandomFileInputStream.java │ ├── metadata │ │ ├── Application.java │ │ ├── CueIndex.java │ │ ├── CueSheet.java │ │ ├── CueTrack.java │ │ ├── Metadata.java │ │ ├── Padding.java │ │ ├── Picture.java │ │ ├── SeekPoint.java │ │ ├── SeekTable.java │ │ ├── StreamInfo.java │ │ ├── Unknown.java │ │ ├── Violation.java │ │ ├── VorbisComment.java │ │ └── VorbisString.java │ └── util │ │ ├── BitMath.java │ │ ├── ByteData.java │ │ ├── CRC16.java │ │ └── CRC8.java │ ├── jmac │ ├── decoder │ │ ├── APEDecompress.java │ │ ├── APEDecompressCore.java │ │ ├── APEDecompressOld.java │ │ ├── AntiPredictor.java │ │ ├── AntiPredictorExtraHigh0000To3320.java │ │ ├── AntiPredictorExtraHigh3320To3600.java │ │ ├── AntiPredictorExtraHigh3600To3700.java │ │ ├── AntiPredictorExtraHigh3700To3800.java │ │ ├── AntiPredictorExtraHigh3800ToCurrent.java │ │ ├── AntiPredictorExtraHighHelper.java │ │ ├── AntiPredictorFast0000To3320.java │ │ ├── AntiPredictorFast3320ToCurrent.java │ │ ├── AntiPredictorHigh0000To3320.java │ │ ├── AntiPredictorHigh3320To3600.java │ │ ├── AntiPredictorHigh3600To3700.java │ │ ├── AntiPredictorHigh3700To3800.java │ │ ├── AntiPredictorHigh3800ToCurrent.java │ │ ├── AntiPredictorNormal0000To3320.java │ │ ├── AntiPredictorNormal3320To3800.java │ │ ├── AntiPredictorNormal3800ToCurrent.java │ │ ├── AntiPredictorOffset.java │ │ ├── DecodeValueMethod.java │ │ ├── IAPEDecompress.java │ │ ├── RangeCoderStructDecompress.java │ │ ├── UnBitArray.java │ │ ├── UnBitArrayBase.java │ │ ├── UnBitArrayOld.java │ │ ├── UnBitArrayState.java │ │ └── UnMAC.java │ ├── info │ │ ├── APEDescriptor.java │ │ ├── APEFileInfo.java │ │ ├── APEHeader.java │ │ ├── APEHeaderNew.java │ │ ├── APEHeaderOld.java │ │ ├── APEInfo.java │ │ ├── APELink.java │ │ ├── APETag.java │ │ ├── APETagField.java │ │ ├── APETagFooter.java │ │ ├── CompressionLevel.java │ │ ├── ID3Genre.java │ │ ├── ID3Tag.java │ │ ├── SpecialFrame.java │ │ ├── WaveFormat.java │ │ └── WaveHeader.java │ ├── prediction │ │ ├── IPredictorDecompress.java │ │ ├── NNFilter.java │ │ ├── NNFilter1280.java │ │ ├── NNFilter16.java │ │ ├── NNFilter256.java │ │ ├── NNFilter32.java │ │ ├── NNFilter64.java │ │ ├── PredictorDecompress3950toCurrent.java │ │ └── PredictorDecompressNormal3930to3950.java │ └── tools │ │ ├── ByteArrayReader.java │ │ ├── ByteArrayWriter.java │ │ ├── ByteBuffer.java │ │ ├── CircleBuffer.java │ │ ├── Crc32.java │ │ ├── File.java │ │ ├── InputStreamFile.java │ │ ├── IntegerPointer.java │ │ ├── JMACException.java │ │ ├── JMACSkippedException.java │ │ ├── JMACStoppedByUserException.java │ │ ├── Prepare.java │ │ ├── RandomAccessFile.java │ │ ├── RollBufferFastInt.java │ │ └── RollBufferShort.java │ ├── mp3 │ └── decoder │ │ ├── BitReserve.java │ │ ├── Bitstream.java │ │ ├── BitstreamErrors.java │ │ ├── BitstreamException.java │ │ ├── Crc16.java │ │ ├── Decoder.java │ │ ├── DecoderErrors.java │ │ ├── DecoderException.java │ │ ├── Equalizer.java │ │ ├── FrameDecoder.java │ │ ├── Header.java │ │ ├── JavaLayerErrors.java │ │ ├── JavaLayerException.java │ │ ├── JavaLayerHook.java │ │ ├── JavaLayerUtils.java │ │ ├── LayerIDecoder.java │ │ ├── LayerIIDecoder.java │ │ ├── LayerIIIDecoder.java │ │ ├── Obuffer.java │ │ ├── OutputChannels.java │ │ ├── SampleBuffer.java │ │ ├── SynthesisFilter.java │ │ ├── huffcodetab.java │ │ └── sfd.ser │ ├── ogg │ ├── jogg │ │ ├── Buffer.java │ │ ├── Packet.java │ │ ├── Page.java │ │ ├── StreamState.java │ │ └── SyncState.java │ └── jorbis │ │ ├── Block.java │ │ ├── ChainingExample.java │ │ ├── CodeBook.java │ │ ├── Comment.java │ │ ├── Drft.java │ │ ├── DspState.java │ │ ├── Floor0.java │ │ ├── Floor1.java │ │ ├── FuncFloor.java │ │ ├── FuncMapping.java │ │ ├── FuncResidue.java │ │ ├── FuncTime.java │ │ ├── Info.java │ │ ├── InfoMode.java │ │ ├── JOrbisException.java │ │ ├── Lookup.java │ │ ├── Lpc.java │ │ ├── Lsp.java │ │ ├── Mapping0.java │ │ ├── Mdct.java │ │ ├── PsyInfo.java │ │ ├── PsyLook.java │ │ ├── Residue0.java │ │ ├── Residue1.java │ │ ├── Residue2.java │ │ ├── StaticCodeBook.java │ │ ├── Time0.java │ │ ├── Util.java │ │ └── VorbisFile.java │ ├── opl3 │ ├── FMOPL_072.java │ └── OPL3.java │ └── sidplay │ ├── libsidplay │ ├── Config.java │ ├── NullSID.java │ ├── Player.java │ ├── SIDPlay2.java │ ├── common │ │ ├── C64Env.java │ │ ├── Event.java │ │ ├── EventScheduler.java │ │ ├── IComponent.java │ │ ├── IEventContext.java │ │ ├── ISID2Types.java │ │ ├── SIDBuilder.java │ │ ├── SIDEmu.java │ │ ├── SIDEndian.java │ │ └── mos6510 │ │ │ ├── C64Environment.java │ │ │ ├── IConf6510.java │ │ │ ├── IOpCode.java │ │ │ ├── MOS6510.java │ │ │ └── SID6510.java │ ├── components │ │ ├── mos6526 │ │ │ ├── C64CIA.java │ │ │ ├── MOS6526.java │ │ │ └── SID6526.java │ │ ├── mos656x │ │ │ ├── C64VIC.java │ │ │ └── MOS656X.java │ │ ├── sidtune │ │ │ ├── Buffer_sidtt.java │ │ │ ├── ISidTuneCfg.java │ │ │ ├── InfoFile.java │ │ │ ├── Mus.java │ │ │ ├── P00.java │ │ │ ├── PP20.java │ │ │ ├── PSid.java │ │ │ ├── Prg.java │ │ │ ├── SidTune.java │ │ │ ├── SidTuneInfo.java │ │ │ ├── SmartPtrBase_sidtt.java │ │ │ └── SmartPtr_sidtt.java │ │ └── xsid │ │ │ ├── C64XSID.java │ │ │ └── XSID.java │ └── mem │ │ ├── IBasic.java │ │ ├── IChar.java │ │ ├── IKernal.java │ │ ├── IPSIDDrv.java │ │ └── IPowerOn.java │ └── resid_builder │ ├── ReSID.java │ ├── ReSIDBuilder.java │ ├── resid │ ├── EnvelopeGenerator.java │ ├── ExternalFilter.java │ ├── Filter.java │ ├── ISIDDefs.java │ ├── PointPlotter.java │ ├── Potentiometer.java │ ├── SID.java │ ├── Voice.java │ ├── WAVE6581_PST │ ├── WAVE6581_PS_ │ ├── WAVE6581_P_T │ ├── WAVE6581__ST │ ├── WAVE8580_PST │ ├── WAVE8580_PS_ │ ├── WAVE8580_P_T │ ├── WAVE8580__ST │ ├── Wave.java │ └── WaveformGenerator.java │ └── sid_filter_t.java └── gpl-3.0.txt /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | 25 | /bin/ 26 | /.classpath 27 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | javamod 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=optimize out 6 | org.eclipse.jdt.core.compiler.compliance=17 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=do not generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=do not generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=do not generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 12 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 13 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 14 | org.eclipse.jdt.core.compiler.release=disabled 15 | org.eclipse.jdt.core.compiler.source=17 16 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/io/RandomAccessInputStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) RandomAccessInputStream.java 3 | * 4 | * Created on 10.09.2009 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.io; 23 | 24 | import java.io.File; 25 | import java.io.IOException; 26 | 27 | /** 28 | * Interface for the RandomAccessInputStream that is used by ModfileInputStream 29 | * @author Daniel Becker 30 | * @since 10.09.2009 31 | */ 32 | public interface RandomAccessInputStream 33 | { 34 | public File getFile(); 35 | // InputStream functions - normally implemented due to extending from InputStream 36 | public int available() throws IOException; 37 | public void close() throws IOException; 38 | public void mark(int readlimit); 39 | public boolean markSupported(); 40 | public int read() throws IOException; 41 | public int read(byte[] b, int off, int len) throws IOException; 42 | public int read(byte[] b) throws IOException; 43 | public void reset() throws IOException; 44 | public long skip(long n) throws IOException; 45 | // New functions 46 | public long getFilePointer() throws IOException; 47 | public void seek(long pos) throws IOException; 48 | public byte readByte() throws IOException; 49 | public long getLength() throws IOException; 50 | public int skipBack(int n) throws IOException; 51 | // RandomAccessFile functions 52 | public int skipBytes(int n) throws IOException; 53 | public long length() throws IOException; 54 | public boolean readBoolean() throws IOException; 55 | public char readChar() throws IOException; 56 | public short readShort() throws IOException; 57 | public double readDouble() throws IOException; 58 | public float readFloat() throws IOException; 59 | public int readInt() throws IOException; 60 | public String readLine() throws IOException; 61 | public long readLong() throws IOException; 62 | public int readUnsignedByte() throws IOException; 63 | public int readUnsignedShort() throws IOException; 64 | public String readUTF() throws IOException; 65 | } 66 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/io/SoundOutputStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) SoundOutputStream.java 3 | * 4 | * Created on 02.10.2010 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.io; 23 | 24 | import java.io.File; 25 | 26 | import javax.sound.sampled.AudioFormat; 27 | 28 | import de.quippy.javamod.io.wav.WaveFile; 29 | import de.quippy.javamod.mixer.dsp.AudioProcessor; 30 | 31 | 32 | /** 33 | * @author Daniel Becker 34 | * This Interface describes a soundoutput stream for playback 35 | * @since 02.10.2010 36 | */ 37 | public interface SoundOutputStream 38 | { 39 | public void open(); 40 | public void close(); 41 | public void closeAllDevices(); 42 | public boolean isInitialized(); 43 | public void startLine(final boolean flushOrDrain); 44 | public void stopLine(final boolean flushOrDrain); 45 | public void flushLine(); 46 | public void drainLine(); 47 | public int getLineBufferSize(); 48 | public void writeSampleData(final byte[] samples, final int start, final int length); 49 | public void setInternalFramePosition(final long newPosition); 50 | public long getFramePosition(); 51 | public void setVolume(final float gain); 52 | public void setBalance(final float balance); 53 | public void setAudioProcessor(final AudioProcessor audioProcessor); 54 | public void setExportFile(final File exportFile); 55 | public void setWaveExportFile(final WaveFile waveExportFile); 56 | public void setPlayDuringExport(final boolean playDuringExport); 57 | public void setKeepSilent(final boolean keepSilent); 58 | public void changeAudioFormatTo(final AudioFormat newFormat); 59 | public void changeAudioFormatTo(final AudioFormat newFormat, final int newSourceLineBufferSize); 60 | public void setSourceLineBufferSize(final int newSourceLineBufferSize); 61 | public AudioFormat getAudioFormat(); 62 | public boolean matches(final SoundOutputStream otherStream); 63 | } 64 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/JavaMod.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) JavaMod.java 3 | * 4 | * Created on 22.06.2006 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.main; 23 | 24 | import java.awt.EventQueue; 25 | import java.io.File; 26 | 27 | import de.quippy.javamod.main.gui.MainForm; 28 | import de.quippy.javamod.system.Helpers; 29 | 30 | /** 31 | * @author Daniel Becker 32 | * @since 22.06.2006 33 | */ 34 | public class JavaMod extends JavaModMainBase 35 | { 36 | /** 37 | * Constructor for JavaMod 38 | */ 39 | public JavaMod() 40 | { 41 | super(true); 42 | } 43 | 44 | /** 45 | * parses through the parameter - params (starting with '-') are not 46 | * allowed here - we filter them out 47 | * @since 31.12.2010 48 | * @param args 49 | * @return the given filename 50 | */ 51 | private static String getFileName(final String[] args) 52 | { 53 | String fileName = null; 54 | for (final String arg : args) 55 | { 56 | if (!arg.startsWith("-")) 57 | { 58 | fileName = arg; 59 | break; 60 | } 61 | } 62 | return fileName; 63 | } 64 | /** 65 | * @since 22.06.2006 66 | * @param args 67 | */ 68 | public static void main(final String[] args) 69 | { 70 | EventQueue.invokeLater(new Runnable() 71 | { 72 | @Override 73 | public void run() 74 | { 75 | final MainForm mainForm = new MainForm(); 76 | Helpers.setCoding(true); 77 | mainForm.setVisible(true); 78 | if (args.length>0) 79 | { 80 | final String fileName = getFileName(args); 81 | if (fileName!=null) 82 | { 83 | final File f = new File(fileName); 84 | if (f.exists()) 85 | mainForm.doOpenFile(new File[] { f }); 86 | else 87 | mainForm.doOpenURL(fileName); 88 | mainForm.doStartPlaying(); 89 | } 90 | } 91 | } 92 | }); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/JavaModMainBase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) JavaModMainBase.java 3 | * 4 | * Created on 15.06.2006 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.main; 23 | 24 | import de.quippy.javamod.system.Helpers; 25 | import de.quippy.javamod.system.Log; 26 | 27 | 28 | /** 29 | * @author Daniel Becker 30 | * @since 15.06.2006 31 | */ 32 | public class JavaModMainBase 33 | { 34 | static 35 | { 36 | // Now load and initialize all classes, that should not be 37 | // initialized during play! 38 | Helpers.registerAllClasses(); 39 | Log.setLogLevel(Log.LOGLEVEL_ERROR | Log.LOGLEVEL_INFO); 40 | } 41 | /** 42 | * Constructor for JavaModMainBase 43 | */ 44 | public JavaModMainBase(final boolean gui) 45 | { 46 | super(); 47 | Helpers.setCoding(gui); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/PlayThreadEventListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) PlayThreadEventListener.java 3 | * 4 | * Created on 18.05.2008 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.main.gui; 23 | 24 | import java.util.EventListener; 25 | 26 | /** 27 | * @author Daniel Becker 28 | * @since 18.05.2008 29 | */ 30 | public interface PlayThreadEventListener extends EventListener 31 | { 32 | public void playThreadEventOccured(PlayThread thread); 33 | } 34 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/components/ProgressDialog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) ProgressDialog.java 3 | * 4 | * Created on 24.07.2020 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.main.gui.components; 23 | 24 | /** 25 | * @author Daniel Becker 26 | * @since 24.07.2020 27 | */ 28 | public interface ProgressDialog 29 | { 30 | public void setDetailMinimum(final int minValue); 31 | public void setDetailMaximum(final int maxValue); 32 | public void setDetailValue(final int value); 33 | } 34 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/components/SeekBarPanelListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) SeekBarPanelListener.java 3 | * 4 | * Created on 15.02.2012 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.main.gui.components; 23 | 24 | /** 25 | * @author Daniel Becker 26 | * 27 | */ 28 | public interface SeekBarPanelListener 29 | { 30 | public void valuesChanged(long milliseconds); 31 | } 32 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/playlist/PlaylistGUIChangeListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) PlaylistGUIChangeListener.java 3 | * 4 | * Created on 30.01.2011 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.main.gui.playlist; 23 | 24 | import de.quippy.javamod.main.playlist.PlayList; 25 | 26 | /** 27 | * @author Daniel Becker 28 | * @since 30.01.2011 29 | */ 30 | public interface PlaylistGUIChangeListener 31 | { 32 | public void userSelectedPlaylistEntry(); 33 | public void playListChanged(PlayList newPlayList); 34 | } 35 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lightbulbs/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lightbulbs/0.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lightbulbs/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lightbulbs/1.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lightbulbs/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lightbulbs/10.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lightbulbs/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lightbulbs/11.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lightbulbs/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lightbulbs/12.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lightbulbs/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lightbulbs/13.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lightbulbs/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lightbulbs/14.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lightbulbs/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lightbulbs/2.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lightbulbs/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lightbulbs/3.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lightbulbs/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lightbulbs/4.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lightbulbs/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lightbulbs/5.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lightbulbs/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lightbulbs/6.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lightbulbs/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lightbulbs/7.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lightbulbs/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lightbulbs/8.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lightbulbs/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lightbulbs/9.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/lucon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/lucon.ttf -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/next.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/next_aktiv.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/next_aktiv.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/next_normal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/next_normal.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/pause.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/pause.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/pause_aktiv.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/pause_aktiv.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/pause_normal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/pause_normal.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/play.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/play.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/play_aktiv.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/play_aktiv.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/play_normal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/play_normal.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/prev.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/prev.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/prev_aktiv.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/prev_aktiv.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/prev_normal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/prev_normal.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/quippy_the_kangaroo_about.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/quippy_the_kangaroo_about.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/repeat.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/repeat.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/repeat_active.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/repeat_active.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/repeat_normal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/repeat_normal.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/save.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/save.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/shuffle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/shuffle.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/stop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/stop.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/stop_aktiv.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/stop_aktiv.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/ressources/stop_normal.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/javamod/main/gui/ressources/stop_normal.gif -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/tools/FileChooserResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) FileChooserResult.java 3 | * 4 | * Created on 05.01.2008 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.main.gui.tools; 23 | 24 | import java.io.File; 25 | 26 | import javax.swing.filechooser.FileFilter; 27 | 28 | /** 29 | * Returns the filechooser selection 30 | * We need the selected FileFilter to select 31 | * the appropriate wave file encoding 32 | * @author Daniel Becker 33 | * @since 05.01.2008 34 | */ 35 | public class FileChooserResult 36 | { 37 | public FileFilter selectedFilter; 38 | public File[] selectedFiles; 39 | /** 40 | * Constructor for FileChooserResult 41 | */ 42 | public FileChooserResult(final FileFilter selectedFilter, final File[] selectedFiles) 43 | { 44 | super(); 45 | this.selectedFilter = selectedFilter; 46 | this.selectedFiles = selectedFiles; 47 | } 48 | /** 49 | * @return the selectedFilter 50 | */ 51 | public FileFilter getSelectedFilter() 52 | { 53 | return selectedFilter; 54 | } 55 | /** 56 | * @param selectedFilter the selectedFilter to set 57 | */ 58 | public void setSelectedFilter(final FileFilter selectedFilter) 59 | { 60 | this.selectedFilter = selectedFilter; 61 | } 62 | /** 63 | * @return the selectedFile 64 | */ 65 | public File [] getSelectedFiles() 66 | { 67 | return selectedFiles; 68 | } 69 | /** 70 | * @return the first selectedFile 71 | */ 72 | public File getSelectedFile() 73 | { 74 | if (selectedFiles!=null && selectedFiles.length>0) 75 | return selectedFiles[0]; 76 | else 77 | return null; 78 | } 79 | /** 80 | * @param selectedFile the selectedFile to set 81 | */ 82 | public void setSelectedFile(final File[] selectedFiles) 83 | { 84 | this.selectedFiles = selectedFiles; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/gui/tools/PlaylistDropListenerCallBack.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) PlaylistDropListenerCallBack.java 3 | * 4 | * Created on 08.03.2011 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.main.gui.tools; 23 | 24 | import java.awt.dnd.DropTargetDropEvent; 25 | import java.net.URL; 26 | 27 | import de.quippy.javamod.main.playlist.PlayList; 28 | 29 | /** 30 | * @author Daniel Becker 31 | * 32 | */ 33 | public interface PlaylistDropListenerCallBack 34 | { 35 | public void playlistRecieved(DropTargetDropEvent dtde, PlayList dropResult, URL addToLastLoaded); 36 | } 37 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/playlist/PlaylistChangedListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) PlaylistChangedListener.java 3 | * 4 | * Created on 30.01.2011 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.main.playlist; 23 | 24 | /** 25 | * @author Daniel Becker 26 | * @since 30.01.2011 27 | */ 28 | public interface PlaylistChangedListener 29 | { 30 | public void activeElementChanged(PlayListEntry oldActiveElement, PlayListEntry newActiveElement); 31 | public void selectedElementChanged(PlayListEntry oldSelectedElement, PlayListEntry newSelectedElement); 32 | } 33 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/playlist/cuesheet/CueFile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) CueFile.java 3 | * 4 | * Created on 14.02.2012 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.main.playlist.cuesheet; 23 | 24 | import java.net.URL; 25 | import java.util.ArrayList; 26 | 27 | /** 28 | * @author Daniel Becker 29 | * 30 | */ 31 | public class CueFile 32 | { 33 | private URL file; 34 | private String type; 35 | private final ArrayList tracks; 36 | 37 | /** 38 | * 39 | * @since 14.02.2012 40 | */ 41 | public CueFile() 42 | { 43 | super(); 44 | tracks = new ArrayList<>(); 45 | } 46 | 47 | /** 48 | * @return the file 49 | * @since 14.02.2012 50 | */ 51 | public URL getFile() 52 | { 53 | return file; 54 | } 55 | /** 56 | * @param file the file to set 57 | * @since 14.02.2012 58 | */ 59 | public void setFile(final URL file) 60 | { 61 | this.file = file; 62 | } 63 | /** 64 | * @return the type 65 | * @since 14.02.2012 66 | */ 67 | public String getType() 68 | { 69 | return type; 70 | } 71 | /** 72 | * @param type the type to set 73 | * @since 14.02.2012 74 | */ 75 | public void setType(final String type) 76 | { 77 | this.type = type; 78 | } 79 | /** 80 | * @param cueTrack 81 | * @since 14.02.2012 82 | */ 83 | public void addTrack(final CueTrack cueTrack) 84 | { 85 | tracks.add(cueTrack); 86 | } 87 | /** 88 | * @return the tracks 89 | * @since 14.02.2012 90 | */ 91 | public ArrayList getTracks() 92 | { 93 | return tracks; 94 | } 95 | } -------------------------------------------------------------------------------- /source/de/quippy/javamod/main/playlist/cuesheet/CueIndex.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) CueIndex.java 3 | * 4 | * Created on 14.02.2012 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.main.playlist.cuesheet; 23 | 24 | /** 25 | * @author Daniel Becker 26 | * 27 | */ 28 | public class CueIndex 29 | { 30 | private int indexNo; 31 | private long millisecondIndex; 32 | /** 33 | * 34 | * @since 14.02.2012 35 | */ 36 | public CueIndex() 37 | { 38 | super(); 39 | } 40 | 41 | /** 42 | * @return the indexNo 43 | * @since 14.02.2012 44 | */ 45 | public int getIndexNo() 46 | { 47 | return indexNo; 48 | } 49 | /** 50 | * @param indexNo the indexNo to set 51 | * @since 14.02.2012 52 | */ 53 | public void setIndexNo(final int indexNo) 54 | { 55 | this.indexNo = indexNo; 56 | } 57 | /** 58 | * @return the millisecondIndex 59 | * @since 14.02.2012 60 | */ 61 | public long getMillisecondIndex() 62 | { 63 | return millisecondIndex; 64 | } 65 | /** 66 | * @param millisecondIndex the millisecondIndex to set 67 | * @since 14.02.2012 68 | */ 69 | public void setMillisecondIndex(final long millisecondIndex) 70 | { 71 | this.millisecondIndex = millisecondIndex; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/mixer/dsp/DSPEffekt.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) DSPEffekt.java 3 | * 4 | * Created on 09.01.2012 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.mixer.dsp; 23 | 24 | import javax.sound.sampled.AudioFormat; 25 | 26 | /** 27 | * @author Daniel Becker 28 | * 29 | */ 30 | public interface DSPEffekt 31 | { 32 | public void initialize(final AudioFormat audioFormat, final int sampleBufferLength); 33 | public int doEffekt(final float[] buffer, final int start, final int length); 34 | public void setIsActive(boolean active); 35 | public boolean isActive(); 36 | } 37 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/mixer/dsp/DspProcessorCallBack.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) DspProcessorCallBack.java 3 | * 4 | * Created on 28.09.2007 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.mixer.dsp; 23 | 24 | import java.util.EventListener; 25 | 26 | /** 27 | * @author Daniel Becker 28 | * @since 28.09.2007 29 | */ 30 | public interface DspProcessorCallBack extends EventListener 31 | { 32 | /** This method will communicate new samples 1.0<=x<=-1.0 for left and right channel */ 33 | public void currentSampleChanged(float [] leftSample, float [] rightSample); 34 | } 35 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/multimedia/MultimediaContainerEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) MultimediaContainerEvent.java 3 | * 4 | * Created on 27.12.2008 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.multimedia; 23 | 24 | import java.util.EventObject; 25 | 26 | /** 27 | * @author Daniel Becker 28 | * @since 27.12.2008 29 | */ 30 | public class MultimediaContainerEvent extends EventObject 31 | { 32 | private static final long serialVersionUID = 5125318726800658845L; 33 | 34 | public static int SONG_NAME_CHANGED = 1; 35 | public static int SONG_NAME_CHANGED_OLD_INVALID = 3; 36 | 37 | private final int type; 38 | private final Object event; 39 | /** 40 | * Constructor for MultimediaContainerEvent 41 | * @param source 42 | */ 43 | public MultimediaContainerEvent(final Object source, final int type, final Object event) 44 | { 45 | super(source); 46 | this.type = type; 47 | this.event = event; 48 | } 49 | /** 50 | * @return the type 51 | */ 52 | public int getType() 53 | { 54 | return type; 55 | } 56 | /** 57 | * @return the event 58 | */ 59 | public Object getEvent() 60 | { 61 | return event; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/multimedia/MultimediaContainerEventListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) MultimediaContainerEventListener.java 3 | * 4 | * Created on 27.12.2008 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.multimedia; 23 | 24 | import java.util.EventListener; 25 | 26 | /** 27 | * @author Daniel Becker 28 | * @since 27.12.2008 29 | */ 30 | public interface MultimediaContainerEventListener extends EventListener 31 | { 32 | /** 33 | * Will get fired if an event of interest is raised. This is actually 34 | * only once the case: if an mp3 is streamd and the IcyInputStream 35 | * gets a new Title 36 | * @since 27.12.2008 37 | * @param event 38 | */ 39 | public void multimediaContainerEventOccured(MultimediaContainerEvent event); 40 | } 41 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/multimedia/mp3/id3/exceptions/ID3FieldDataException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) ID3FieldDataException.java 3 | * 4 | * Created on 23.12.2008 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | 23 | package de.quippy.javamod.multimedia.mp3.id3.exceptions; 24 | 25 | public class ID3FieldDataException extends Exception 26 | { 27 | private static final long serialVersionUID = -2358436509702583539L; 28 | 29 | /** 30 | * Create an ID3FieldDataException with a default message 31 | * 32 | */ 33 | public ID3FieldDataException() 34 | { 35 | super("Invalid data supplied to ID3 tag."); 36 | } 37 | 38 | /** 39 | * Create an ID3FieldDataException with the specified message 40 | * 41 | * @param msg a String specifying the specific problem encountered 42 | */ 43 | public ID3FieldDataException(final String msg) 44 | { 45 | super(msg); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/multimedia/mp3/id3/exceptions/ID3v2FormatException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) ID3v2FormatException.java 3 | * 4 | * Created on 23.12.2008 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | 23 | package de.quippy.javamod.multimedia.mp3.id3.exceptions; 24 | 25 | /** 26 | * Description: 27 | * This exception is thrown when an data in an id3v2 tag violates the 28 | * id3v2 standards. 29 | * 30 | * @author: Jonathan Hilliker modified by Daniel Becker 31 | */ 32 | public class ID3v2FormatException extends Exception 33 | { 34 | private static final long serialVersionUID = 1668617234586193326L; 35 | 36 | /** 37 | * Create an ID3v2FormatException with a default message 38 | * 39 | */ 40 | public ID3v2FormatException() 41 | { 42 | super("ID3v2 tag is not formatted correctly."); 43 | } 44 | 45 | /** 46 | * Create an ID3v2FormatException with a specified message 47 | * 48 | * @param msg the message for this exception 49 | */ 50 | public ID3v2FormatException(final String msg) 51 | { 52 | super(msg); 53 | } 54 | 55 | /** 56 | * Create an ID3v2FormatException with a specified message 57 | * and original exception 58 | * 59 | * @param msg the message for this exception 60 | * @param cause the cause that wraps this exception 61 | */ 62 | public ID3v2FormatException(final String message, final Throwable cause) 63 | { 64 | super(message, cause); 65 | } 66 | 67 | /** 68 | * Create an ID3v2FormatException with the original 69 | * exception 70 | * 71 | * @param cause the cause that wraps this exception 72 | */ 73 | public ID3v2FormatException(final Throwable cause) 74 | { 75 | super(cause); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/multimedia/mp3/id3/exceptions/NoMPEGFramesException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) ID3FieldDataException.java 3 | * 4 | * Created on 23.12.2008 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.multimedia.mp3.id3.exceptions; 23 | 24 | /** 25 | * Description: 26 | * An exception to be thrown if the parser is unable to find an mpeg header. 27 | * 28 | * @author: Jonathan Hilliker 29 | * @version: $Id: NoMPEGFramesException.java,v 1.3 2013-03-24 13:29:01 quippy Exp $ 30 | * Revsisions: 31 | * $Log: not supported by cvs2svn $ 32 | * Revision 1.2 2010/04/07 17:03:49 quippy 33 | * *** empty log message *** 34 | * 35 | * Revision 1.1 2008/12/24 13:08:27 quippy 36 | * *** empty log message *** 37 | * 38 | * Revision 1.2 2001/10/19 03:57:53 helliker 39 | * All set for release. 40 | * 41 | * 42 | */ 43 | public class NoMPEGFramesException extends Exception 44 | { 45 | private static final long serialVersionUID = -8189457738550297675L; 46 | 47 | /** 48 | * Create a NoMPEGFramesException with a default message. 49 | * 50 | */ 51 | public NoMPEGFramesException() 52 | { 53 | super("The file specified is not a valid MPEG."); 54 | } 55 | 56 | /** 57 | * Create a NoMPEGFramesException with a specified message. 58 | * 59 | * @param msg the message for this exception 60 | */ 61 | public NoMPEGFramesException(final String msg) 62 | { 63 | super(msg); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/multimedia/mp3/streaming/IcyTag.java: -------------------------------------------------------------------------------- 1 | /* 2 | * IcyTag. 3 | * 4 | * jicyshout : http://sourceforge.net/projects/jicyshout/ 5 | * 6 | * JavaZOOM : mp3spi@javazoom.net 7 | * http://www.javazoom.net 8 | * 9 | *----------------------------------------------------------------------- 10 | * This program is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU Library General Public License as published 12 | * by the Free Software Foundation; either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Library General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Library General Public 21 | * License along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 | *---------------------------------------------------------------------- 24 | */ 25 | 26 | package de.quippy.javamod.multimedia.mp3.streaming; 27 | 28 | import java.io.Serializable; 29 | 30 | import de.quippy.javamod.system.Helpers; 31 | 32 | /** 33 | * A tag parsed from an icecast tag. 34 | */ 35 | public class IcyTag implements Serializable 36 | { 37 | private static final long serialVersionUID = -5433537975531168164L; 38 | 39 | private final String name; 40 | private final String value; 41 | 42 | public IcyTag(final String name, final String value) 43 | { 44 | this.name = (name!=null)?name.toLowerCase():"NULL"; 45 | // This is somewhat ridiculous but unavoidable. We must read from the stream in ISO-8859-1 (cannot accept encoding UTF-8 - would mangle even more) 46 | // After that the headers (that are not affected by "Accept-Encodig" due to conventions) will contain two byte characters for UTF-8 ones - so we need to re-encode with UTF-8 47 | // and now do that in general here. 48 | this.value = Helpers.convertStringEncoding(value, Helpers.CODING_ICY, Helpers.CODING_UTF8); 49 | } 50 | public String getName() 51 | { 52 | return name; 53 | } 54 | public String getValue() 55 | { 56 | return value; 57 | } 58 | @Override 59 | public String toString() 60 | { 61 | return getName() + ":" + getValue(); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/multimedia/mp3/streaming/TagParseEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TagParseEvent. 3 | * 4 | * jicyshout : http://sourceforge.net/projects/jicyshout/ 5 | * 6 | * JavaZOOM : mp3spi@javazoom.net 7 | * http://www.javazoom.net 8 | * 9 | *----------------------------------------------------------------------- 10 | * This program is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU Library General Public License as published 12 | * by the Free Software Foundation; either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Library General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Library General Public 21 | * License along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 | *---------------------------------------------------------------------- 24 | */ 25 | 26 | package de.quippy.javamod.multimedia.mp3.streaming; 27 | 28 | import java.util.EventObject; 29 | 30 | /** 31 | * Event to indicate that an MP3 tag was received through 32 | * some means (parsed in stream, received via UDP, whatever) 33 | * and converted into an MP3Tag object. 34 | */ 35 | public class TagParseEvent extends EventObject 36 | { 37 | private static final long serialVersionUID = -4050376664469621405L; 38 | 39 | protected IcyTag tag; 40 | 41 | public TagParseEvent(final Object source, final IcyTag tag) 42 | { 43 | super(source); 44 | this.tag = tag; 45 | } 46 | /** 47 | * Get the tag that was parsed. 48 | */ 49 | public IcyTag getIcyTag() 50 | { 51 | return tag; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/multimedia/mp3/streaming/TagParseListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TagParseListener. 3 | * 4 | * jicyshout : http://sourceforge.net/projects/jicyshout/ 5 | * 6 | * JavaZOOM : mp3spi@javazoom.net 7 | * http://www.javazoom.net 8 | * 9 | *----------------------------------------------------------------------- 10 | * This program is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU Library General Public License as published 12 | * by the Free Software Foundation; either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Library General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Library General Public 21 | * License along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 | *---------------------------------------------------------------------- 24 | */ 25 | 26 | package de.quippy.javamod.multimedia.mp3.streaming; 27 | 28 | import java.util.EventListener; 29 | 30 | /** 31 | * EventListener to be implemented by objects that want to 32 | * get callbacks when MP3 tags are received. 33 | */ 34 | public interface TagParseListener extends EventListener 35 | { 36 | /** 37 | * Called when a tag is found (parsed from the stream, 38 | * received via UDP, etc.) 39 | */ 40 | public void tagParsed(TagParseEvent tpe); 41 | } 42 | -------------------------------------------------------------------------------- /source/de/quippy/javamod/system/LogMessageCallBack.java: -------------------------------------------------------------------------------- 1 | /* 2 | * @(#) LogMessageCallBack.java 3 | * 4 | * Created on 03.10.2007 by Daniel Becker 5 | * 6 | *----------------------------------------------------------------------- 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | *---------------------------------------------------------------------- 21 | */ 22 | package de.quippy.javamod.system; 23 | 24 | import java.util.EventListener; 25 | 26 | /** 27 | * @author Daniel Becker 28 | * @since 03.10.2007 29 | */ 30 | public interface LogMessageCallBack extends EventListener 31 | { 32 | public void error(String message, Throwable ex); 33 | public void info(String message); 34 | public void debug(String message); 35 | } 36 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/ChannelData.java: -------------------------------------------------------------------------------- 1 | package de.quippy.jflac; 2 | 3 | /** 4 | * libFLAC - Free Lossless Audio Codec library 5 | * Copyright (C) 2001,2002,2003 Josh Coalson 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | import de.quippy.jflac.frame.EntropyPartitionedRiceContents; 24 | 25 | /** 26 | * FLAC channel data. 27 | * This class holds the data for the channels in a FLAC frame. 28 | * @author kc7bfi 29 | */ 30 | public class ChannelData { 31 | /** The output signal. */ 32 | private final int[] output; 33 | 34 | /** the risidual signal. */ 35 | private final int[] residual; 36 | 37 | /** The Entropy signal. */ 38 | private final EntropyPartitionedRiceContents partitionedRiceContents; 39 | 40 | /** 41 | * The default constructor. 42 | * @param size The block size 43 | */ 44 | public ChannelData(final int size) { 45 | output = new int[size]; 46 | residual = new int[size]; 47 | partitionedRiceContents = new EntropyPartitionedRiceContents(); 48 | } 49 | 50 | /** 51 | * @return Returns the output. 52 | */ 53 | public int[] getOutput() { 54 | return output; 55 | } 56 | 57 | /** 58 | * @return Returns the partitionedRiceContents. 59 | */ 60 | public EntropyPartitionedRiceContents getPartitionedRiceContents() { 61 | return partitionedRiceContents; 62 | } 63 | 64 | /** 65 | * @return Returns the residual. 66 | */ 67 | public int[] getResidual() { 68 | return residual; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/FrameDecodeException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Created on Jun 30, 2004 3 | * 4 | * To change the template for this generated file go to 5 | * Window - Preferences - Java - Code Generation - Code and Comments 6 | */ 7 | package de.quippy.jflac; 8 | 9 | 10 | /** 11 | * @author kc7bfi 12 | * 13 | * To change the template for this generated type comment go to 14 | * Window - Preferences - Java - Code Generation - Code and Comments 15 | */ 16 | public class FrameDecodeException extends Exception { 17 | 18 | private static final long serialVersionUID = -300617550733430161L; 19 | 20 | /** 21 | * Constructor. 22 | */ 23 | public FrameDecodeException() { 24 | super(); 25 | } 26 | 27 | /** 28 | * Constructor. 29 | * @param msg Error message 30 | */ 31 | public FrameDecodeException(final String msg) { 32 | super(msg); 33 | } 34 | 35 | /** 36 | * Constructor. 37 | * @param err The causing error 38 | */ 39 | public FrameDecodeException(final Throwable err) { 40 | super(err); 41 | } 42 | 43 | /** 44 | * Constructor. 45 | * @param msg The error message 46 | * @param err The causing error 47 | */ 48 | public FrameDecodeException(final String msg, final Throwable err) { 49 | super(msg, err); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/FrameListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Created on Jun 2, 2004 3 | * 4 | * To change the template for this generated file go to 5 | * Window - Preferences - Java - Code Generation - Code and Comments 6 | */ 7 | package de.quippy.jflac; 8 | 9 | import de.quippy.jflac.frame.Frame; 10 | import de.quippy.jflac.metadata.Metadata; 11 | 12 | /** 13 | * FrameListener interface. 14 | * This interface defines the singatures for a class to listen 15 | * for frame events from the Decoder. 16 | * @author kc7bfi 17 | */ 18 | public interface FrameListener { 19 | 20 | /** 21 | * Called for each Metadata frame read. 22 | * @param metadata The metadata frame read 23 | */ 24 | public void processMetadata(Metadata metadata); 25 | 26 | /** 27 | * Called for each data frame read. 28 | * @param frame The data frame read 29 | */ 30 | public void processFrame(Frame frame); 31 | 32 | /** 33 | * Called for each frame error detected. 34 | * @param msg The error message 35 | */ 36 | public void processError(String msg); 37 | } 38 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/FrameListeners.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Created on Jun 28, 2004 3 | * 4 | * To change the template for this generated file go to 5 | * Window - Preferences - Java - Code Generation - Code and Comments 6 | */ 7 | package de.quippy.jflac; 8 | 9 | import java.util.HashSet; 10 | 11 | import de.quippy.jflac.frame.Frame; 12 | import de.quippy.jflac.metadata.Metadata; 13 | 14 | 15 | /** 16 | * Class to handle frame listeners. 17 | * @author kc7bfi 18 | */ 19 | class FrameListeners implements FrameListener { 20 | private final HashSet frameListeners = new HashSet<>(); 21 | 22 | /** 23 | * Add a frame listener. 24 | * @param listener The frame listener to add 25 | */ 26 | public void addFrameListener(final FrameListener listener) { 27 | synchronized (frameListeners) { 28 | frameListeners.add(listener); 29 | } 30 | } 31 | 32 | /** 33 | * Remove a frame listener. 34 | * @param listener The frame listener to remove 35 | */ 36 | public void removeFrameListener(final FrameListener listener) { 37 | synchronized (frameListeners) { 38 | frameListeners.remove(listener); 39 | } 40 | } 41 | 42 | /** 43 | * Process metadata records. 44 | * @param metadata the metadata block 45 | * @see de.quippy.jflac.FrameListener#processMetadata(de.quippy.jflac.metadata.MetadataBase) 46 | */ 47 | @Override 48 | public void processMetadata(final Metadata metadata) { 49 | synchronized (frameListeners) { 50 | for (final FrameListener listener : frameListeners) 51 | { 52 | listener.processMetadata(metadata); 53 | } 54 | } 55 | } 56 | 57 | /** 58 | * Process data frames. 59 | * @param frame the data frame 60 | * @see de.quippy.jflac.FrameListener#processFrame(de.quippy.jflac.frame.Frame) 61 | */ 62 | @Override 63 | public void processFrame(final Frame frame) { 64 | synchronized (frameListeners) { 65 | for (final FrameListener listener : frameListeners) 66 | { 67 | listener.processFrame(frame); 68 | } 69 | } 70 | } 71 | 72 | /** 73 | * Called for each frame error detected. 74 | * @param msg The error message 75 | * @see de.quippy.jflac.FrameListener#processError(java.lang.String) 76 | */ 77 | @Override 78 | public void processError(final String msg) { 79 | synchronized (frameListeners) { 80 | for (final FrameListener listener : frameListeners) 81 | { 82 | listener.processError(msg); 83 | } 84 | } 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/PCMProcessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Created on Jun 2, 2004 3 | * 4 | * To change the template for this generated file go to 5 | * Window - Preferences - Java - Code Generation - Code and Comments 6 | */ 7 | package de.quippy.jflac; 8 | 9 | import de.quippy.jflac.metadata.StreamInfo; 10 | import de.quippy.jflac.util.ByteData; 11 | 12 | /** 13 | * PCMProcessor interface. 14 | * This interface defines the signatures for a class to listen 15 | * to PCM decode events. 16 | * @author kc7bfi 17 | */ 18 | public interface PCMProcessor { 19 | /** 20 | * Called when StreamInfo read. 21 | * @param streamInfo The FLAC stream info metadata block 22 | */ 23 | public void processStreamInfo(StreamInfo streamInfo); 24 | 25 | /** 26 | * Called when each data frame is decompressed. 27 | * @param pcm The decompressed PCM data 28 | */ 29 | public void processPCM(ByteData pcm); 30 | } 31 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/PCMProcessors.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Created on Jun 28, 2004 3 | * 4 | * To change the template for this generated file go to 5 | * Window - Preferences - Java - Code Generation - Code and Comments 6 | */ 7 | package de.quippy.jflac; 8 | 9 | import java.util.HashSet; 10 | 11 | import de.quippy.jflac.metadata.StreamInfo; 12 | import de.quippy.jflac.util.ByteData; 13 | 14 | 15 | /** 16 | * Class to handle PCM processors. 17 | * @author kc7bfi 18 | */ 19 | class PCMProcessors implements PCMProcessor { 20 | private final HashSet pcmProcessors = new HashSet<>(); 21 | 22 | /** 23 | * Add a PCM processor. 24 | * @param processor The processor listener to add 25 | */ 26 | public void addPCMProcessor(final PCMProcessor processor) { 27 | synchronized (pcmProcessors) { 28 | pcmProcessors.add(processor); 29 | } 30 | } 31 | 32 | /** 33 | * Remove a PCM processor. 34 | * @param processor The processor listener to remove 35 | */ 36 | public void removePCMProcessor(final PCMProcessor processor) { 37 | synchronized (pcmProcessors) { 38 | pcmProcessors.remove(processor); 39 | } 40 | } 41 | 42 | /** 43 | * Process the StreamInfo block. 44 | * @param info the StreamInfo block 45 | * @see de.quippy.jflac.PCMProcessor#processStreamInfo(de.quippy.jflac.metadata.StreamInfo) 46 | */ 47 | @Override 48 | public void processStreamInfo(final StreamInfo info) { 49 | synchronized (pcmProcessors) { 50 | for (final PCMProcessor processor : pcmProcessors) 51 | { 52 | processor.processStreamInfo(info); 53 | } 54 | } 55 | } 56 | 57 | /** 58 | * Process the decoded PCM bytes. 59 | * @param pcm The decoded PCM data 60 | * @see de.quippy.jflac.PCMProcessor#processPCM(de.quippy.jflac.util.ByteSpace) 61 | */ 62 | @Override 63 | public void processPCM(final ByteData pcm) { 64 | synchronized (pcmProcessors) { 65 | for (final PCMProcessor processor : pcmProcessors) 66 | { 67 | processor.processPCM(pcm); 68 | } 69 | } 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/frame/BadHeaderException.java: -------------------------------------------------------------------------------- 1 | package de.quippy.jflac.frame; 2 | 3 | /** 4 | * libFLAC - Free Lossless Audio Codec library 5 | * Copyright (C) 2001,2002,2003 Josh Coalson 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | /** 24 | * BadHeaderException. 25 | * @author kc7bfi 26 | */ 27 | public class BadHeaderException extends Exception { 28 | 29 | private static final long serialVersionUID = -4066414758096151000L; 30 | 31 | /** 32 | * Exception constructor. 33 | */ 34 | public BadHeaderException() { 35 | super(); 36 | } 37 | 38 | /** 39 | * Exception constructor. 40 | * @param msg The exception message 41 | */ 42 | public BadHeaderException(final String msg) { 43 | super(msg); 44 | } 45 | 46 | /** 47 | * Exception constructor. 48 | * @param err The throwable error 49 | */ 50 | public BadHeaderException(final Throwable err) { 51 | super(err); 52 | } 53 | 54 | /** 55 | * Exception constructor. 56 | * @param msg The exception message 57 | * @param err The throwable error 58 | */ 59 | public BadHeaderException(final String msg, final Throwable err) { 60 | super(msg, err); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/frame/Channel.java: -------------------------------------------------------------------------------- 1 | package de.quippy.jflac.frame; 2 | 3 | /** 4 | * libFLAC - Free Lossless Audio Codec library 5 | * Copyright (C) 2001,2002,2003 Josh Coalson 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | /** 24 | * Base class for FLAC subframe (channel) classes. 25 | * @author kc7bfi 26 | */ 27 | public abstract class Channel { 28 | 29 | /** Partisioned Rice Encoding Method. */ 30 | public static final int ENTROPY_CODING_METHOD_PARTITIONED_RICE = 0; 31 | 32 | /** The size of the encoding method field (in bits). */ 33 | public static final int ENTROPY_CODING_METHOD_TYPE_LEN = 2; 34 | 35 | /** The size of the Rice Order field (in bits). */ 36 | public static final int ENTROPY_CODING_METHOD_PARTITIONED_RICE_ORDER_LEN = 4; 37 | 38 | /** The FLAC Frame Header. */ 39 | protected Header header; 40 | 41 | /** The number of waisted bits in the frame. */ 42 | protected int wastedBits; 43 | 44 | /** 45 | * The constructor. 46 | * @param header The FLAC Frame Header 47 | * @param wastedBits The number of waisted bits in the frame 48 | */ 49 | protected Channel(final Header header, final int wastedBits) { 50 | this.header = header; 51 | this.wastedBits = wastedBits; 52 | } 53 | 54 | /** 55 | * Return he number of waisted bits in the frame. 56 | * @return The number of waisted bits in the frame 57 | */ 58 | public int getWastedBits() { 59 | return wastedBits; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/frame/ChannelConstant.java: -------------------------------------------------------------------------------- 1 | package de.quippy.jflac.frame; 2 | 3 | /** 4 | * libFLAC - Free Lossless Audio Codec library 5 | * Copyright (C) 2001,2002,2003 Josh Coalson 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | import java.io.IOException; 24 | 25 | import de.quippy.jflac.ChannelData; 26 | import de.quippy.jflac.io.BitInputStream; 27 | 28 | /** 29 | * FLAC Constant Subframe (Channel) data. 30 | * This class represents a FLAC subframe (channel) for a Constant data 31 | * @author kc7bfi 32 | */ 33 | public class ChannelConstant extends Channel { 34 | 35 | /** The constant signal value. */ 36 | private final int value; 37 | 38 | /** 39 | * The constructor. 40 | * @param is The InputBitStream 41 | * @param header The FLAC Frame Header 42 | * @param channelData The decoded channel data (output) 43 | * @param bps The bits-per-second 44 | * @param wastedBits The bits waisted in the frame 45 | * @throws IOException Thrown if error reading from the InputBitStream 46 | */ 47 | public ChannelConstant(final BitInputStream is, final Header header, final ChannelData channelData, final int bps, final int wastedBits) throws IOException { 48 | super(header, wastedBits); 49 | 50 | value = is.readRawInt(bps); 51 | 52 | // decode the subframe 53 | for (int i = 0; i < header.blockSize; i++) channelData.getOutput()[i] = value; 54 | } 55 | 56 | /** 57 | * toString conversion. 58 | * @see java.lang.Object#toString() 59 | */ 60 | @Override 61 | public String toString() { 62 | return "ChannelConstant: Value=" + value + " WastedBits=" + wastedBits; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/frame/ChannelVerbatim.java: -------------------------------------------------------------------------------- 1 | package de.quippy.jflac.frame; 2 | 3 | /** 4 | * libFLAC - Free Lossless Audio Codec library 5 | * Copyright (C) 2001,2002,2003 Josh Coalson 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | import java.io.IOException; 24 | 25 | import de.quippy.jflac.ChannelData; 26 | import de.quippy.jflac.io.BitInputStream; 27 | 28 | /** 29 | * Verbatim FLAC subframe (channel). 30 | * @author kc7bfi 31 | */ 32 | public class ChannelVerbatim extends Channel { 33 | private final int[] data; // A pointer to verbatim signal. 34 | 35 | /** 36 | * The constructor. 37 | * @param is The InputBitStream 38 | * @param header The FLAC Frame Header 39 | * @param channelData The decoded channel data (output) 40 | * @param bps The bits-per-second 41 | * @param wastedBits The bits waisted in the frame 42 | * @throws IOException Thrown if error reading from the InputBitStream 43 | */ 44 | public ChannelVerbatim(final BitInputStream is, final Header header, final ChannelData channelData, final int bps, final int wastedBits) throws IOException { 45 | super(header, wastedBits); 46 | 47 | data = channelData.getResidual(); 48 | 49 | for (int i = 0; i < header.blockSize; i++) { 50 | data[i] = is.readRawInt(bps); 51 | } 52 | 53 | // decode the subframe 54 | System.arraycopy(data, 0, channelData.getOutput(), 0, header.blockSize); 55 | } 56 | 57 | /** 58 | * @see java.lang.Object#toString() 59 | */ 60 | @Override 61 | public String toString() { 62 | return "ChannelVerbatim: WastedBits=" + wastedBits; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/frame/EntropyCodingMethod.java: -------------------------------------------------------------------------------- 1 | package de.quippy.jflac.frame; 2 | 3 | /** 4 | * libFLAC - Free Lossless Audio Codec library 5 | * Copyright (C) 2001,2002,2003 Josh Coalson 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | public abstract class EntropyCodingMethod { 24 | } 25 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/frame/EntropyPartitionedRiceContents.java: -------------------------------------------------------------------------------- 1 | package de.quippy.jflac.frame; 2 | 3 | /** 4 | * libFLAC - Free Lossless Audio Codec library 5 | * Copyright (C) 2001,2002,2003 Josh Coalson 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | public class EntropyPartitionedRiceContents { 24 | 25 | protected int[] parameters; // The Rice parameters for each context. 26 | protected int[] rawBits; // Widths for escape-coded partitions. 27 | 28 | /** 29 | * The capacity of the parameters and raw_bits arrays specified as an order. 30 | * i.e. the number of array elements allocated is 2 ^ capacity_by_order. 31 | */ 32 | protected int capacityByOrder = 0; 33 | 34 | /** 35 | * Ensure enough menory has been allocated. 36 | * @param maxPartitionOrder The maximum partition order 37 | */ 38 | public void ensureSize(final int maxPartitionOrder) { 39 | if (capacityByOrder >= maxPartitionOrder) return; 40 | parameters = new int[(1 << maxPartitionOrder)]; 41 | rawBits = new int[(1 << maxPartitionOrder)]; 42 | capacityByOrder = maxPartitionOrder; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/metadata/Application.java: -------------------------------------------------------------------------------- 1 | package de.quippy.jflac.metadata; 2 | 3 | /** 4 | * libFLAC - Free Lossless Audio Codec library 5 | * Copyright (C) 2001,2002,2003 Josh Coalson 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | import java.io.IOException; 24 | 25 | import de.quippy.jflac.io.BitInputStream; 26 | 27 | /** 28 | * Application Metadata block. 29 | * @author kc7bfi 30 | */ 31 | public class Application extends Metadata { 32 | 33 | private static final int APPLICATION_ID_LEN = 32; // bits 34 | 35 | private final byte[] id = new byte[4]; 36 | private byte[] data; 37 | 38 | /** 39 | * The constructor. 40 | * @param is The InputBitStream 41 | * @param length Length of the record 42 | * @param isLast True if this is the last Metadata block in the chain 43 | * @throws IOException Thrown if error reading from InputBitStream 44 | */ 45 | public Application(final BitInputStream is, int length, final boolean isLast) throws IOException { 46 | super(isLast); 47 | is.readByteBlockAlignedNoCRC(id, APPLICATION_ID_LEN / 8); 48 | length -= APPLICATION_ID_LEN / 8; 49 | 50 | if (length > 0) { 51 | data = new byte[length]; 52 | is.readByteBlockAlignedNoCRC(data, length); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/metadata/CueIndex.java: -------------------------------------------------------------------------------- 1 | package de.quippy.jflac.metadata; 2 | 3 | /** 4 | * libFLAC - Free Lossless Audio Codec library 5 | * Copyright (C) 2001,2002,2003 Josh Coalson 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | import java.io.IOException; 24 | 25 | import de.quippy.jflac.io.BitInputStream; 26 | 27 | /** 28 | * An entry into the cue track. 29 | * @author kc7bfi 30 | */ 31 | public class CueIndex { 32 | 33 | private static final int CUESHEET_INDEX_OFFSET_LEN = 64; // bits 34 | private static final int CUESHEET_INDEX_NUMBER_LEN = 8; // bits 35 | private static final int CUESHEET_INDEX_RESERVED_LEN = 3 * 8; // bits 36 | 37 | protected long offset; // Offset in samples, relative to the track offset, of the index point. 38 | protected byte number; // The index point number. 39 | 40 | /** 41 | * The constructor. 42 | * @param is The InputBitStream 43 | * @throws IOException Thrown if error reading from InputBitStream 44 | */ 45 | public CueIndex(final BitInputStream is) throws IOException { 46 | offset = is.readRawULong(CUESHEET_INDEX_OFFSET_LEN); 47 | number = (byte) is.readRawUInt(CUESHEET_INDEX_NUMBER_LEN); 48 | is.skipBitsNoCRC(CUESHEET_INDEX_RESERVED_LEN); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/metadata/Metadata.java: -------------------------------------------------------------------------------- 1 | package de.quippy.jflac.metadata; 2 | 3 | /** 4 | * libFLAC - Free Lossless Audio Codec library 5 | * Copyright (C) 2001,2002,2003 Josh Coalson 6 | * Modified 2007 Bruce MacNaughton (added PICTURE metadata type) 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Library General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Library General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Library General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | * Boston, MA 02111-1307, USA. 22 | */ 23 | 24 | /** 25 | * Root class for all Metadata subclasses. 26 | * @author kc7bfi 27 | */ 28 | public abstract class Metadata { 29 | 30 | /** StreamInfo Metatdata type. */ 31 | public static final int METADATA_TYPE_STREAMINFO = 0; 32 | 33 | /** Padding Metatdata type. */ 34 | public static final int METADATA_TYPE_PADDING = 1; 35 | 36 | /** Application Metatdata type. */ 37 | public static final int METADATA_TYPE_APPLICATION = 2; 38 | 39 | /** SeekTable Metatdata type. */ 40 | public static final int METADATA_TYPE_SEEKTABLE = 3; 41 | 42 | /** VorbisComment Metatdata type. */ 43 | public static final int METADATA_TYPE_VORBIS_COMMENT = 4; 44 | 45 | /** CueSheet Metatdata type. */ 46 | public static final int METADATA_TYPE_CUESHEET = 5; 47 | 48 | /** Picture Metatdata type. */ 49 | public static final int METADATA_TYPE_PICTURE = 6; 50 | 51 | /** Metadata IsLast field length. */ 52 | public static final int STREAM_METADATA_IS_LAST_LEN = 1; // bits 53 | 54 | /** Metadata type field length. */ 55 | public static final int STREAM_METADATA_TYPE_LEN = 7; // bits 56 | 57 | /** Metadata length field length. */ 58 | public static final int STREAM_METADATA_LENGTH_LEN = 24; // bits 59 | 60 | protected boolean isLast; 61 | 62 | /** 63 | * Constructir. 64 | * @param isLast True if last Metadata block 65 | */ 66 | public Metadata(final boolean isLast) { 67 | this.isLast = isLast; 68 | } 69 | 70 | /** 71 | * Test if this is the last metadata block. 72 | * @return True if last metadata block in chain 73 | */ 74 | public boolean isLast() { 75 | return isLast; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/metadata/Padding.java: -------------------------------------------------------------------------------- 1 | package de.quippy.jflac.metadata; 2 | 3 | /** 4 | * libFLAC - Free Lossless Audio Codec library 5 | * Copyright (C) 2001,2002,2003 Josh Coalson 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | import java.io.IOException; 24 | 25 | import de.quippy.jflac.io.BitInputStream; 26 | 27 | /** 28 | * Padding Metadata block. 29 | * @author kc7bfi 30 | */ 31 | public class Padding extends Metadata { 32 | private final int length; 33 | 34 | /** 35 | * The constructor. 36 | * @param is The InputBitStream 37 | * @param length Length of the record 38 | * @param isLast True if this is the last Metadata block in the chain 39 | * @throws IOException Thrown if error reading from InputBitStream 40 | */ 41 | public Padding(final BitInputStream is, final int length, final boolean isLast) throws IOException { 42 | super(isLast); 43 | this.length = length; 44 | is.readByteBlockAlignedNoCRC(null, length); 45 | } 46 | 47 | /** 48 | * Convert to string. 49 | * @see java.lang.Object#toString() 50 | */ 51 | @Override 52 | public String toString() { 53 | return "Padding (Length=" + length + ")"; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/metadata/Unknown.java: -------------------------------------------------------------------------------- 1 | package de.quippy.jflac.metadata; 2 | 3 | /** 4 | * libFLAC - Free Lossless Audio Codec library 5 | * Copyright (C) 2001,2002,2003 Josh Coalson 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | import java.io.IOException; 24 | 25 | import de.quippy.jflac.io.BitInputStream; 26 | 27 | /** 28 | * Unknown Metadata block. 29 | * @author kc7bfi 30 | */ 31 | public class Unknown extends Metadata { 32 | protected byte[] data; 33 | 34 | /** 35 | * The constructor. 36 | * @param is The InputBitStream 37 | * @param length Length of the record 38 | * @param isLast True if this is the last Metadata block in the chain 39 | * @throws IOException Thrown if error reading from InputBitStream 40 | */ 41 | public Unknown(final BitInputStream is, final int length, final boolean isLast) throws IOException { 42 | super(isLast); 43 | if (length > 0) { 44 | data = new byte[length]; 45 | is.readByteBlockAlignedNoCRC(data, length); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/metadata/Violation.java: -------------------------------------------------------------------------------- 1 | package de.quippy.jflac.metadata; 2 | 3 | /** 4 | * libFLAC - Free Lossless Audio Codec library 5 | * Copyright (C) 2001,2002,2003 Josh Coalson 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | /** 24 | * Meta data format violation exception. 25 | * @author kc7bfi 26 | */ 27 | public class Violation extends Exception { 28 | 29 | private static final long serialVersionUID = -5740895020743679025L; 30 | 31 | /** 32 | * Constructor. 33 | */ 34 | public Violation() { 35 | super(); 36 | } 37 | 38 | /** 39 | * Constructor. 40 | * @param msg The error message 41 | */ 42 | public Violation(final String msg) { 43 | super(msg); 44 | } 45 | 46 | /** 47 | * Constructor. 48 | * @param err The causing exception 49 | */ 50 | public Violation(final Throwable err) { 51 | super(err); 52 | } 53 | 54 | /** 55 | * Constructor. 56 | * @param msg The error message 57 | * @param err The causing exception 58 | */ 59 | public Violation(final String msg, final Throwable err) { 60 | super(msg, err); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/metadata/VorbisString.java: -------------------------------------------------------------------------------- 1 | package de.quippy.jflac.metadata; 2 | 3 | /** 4 | * libFLAC - Free Lossless Audio Codec library 5 | * Copyright (C) 2001,2002,2003 Josh Coalson 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | import java.io.IOException; 24 | import java.io.UnsupportedEncodingException; 25 | 26 | import de.quippy.jflac.io.BitInputStream; 27 | 28 | /** 29 | * An entry into the Vorbis comment. 30 | * @author kc7bfi 31 | */ 32 | public class VorbisString { 33 | //private static final int VORBIS_COMMENT_ENTRY_LENGTH_LEN = 32; // bits 34 | 35 | protected byte[] entry; 36 | 37 | /** 38 | * The constructor. 39 | * @param is The InputBitStream 40 | * @throws IOException Thrown if error reading from InputBitStream 41 | */ 42 | public VorbisString(final BitInputStream is) throws IOException { 43 | final int elen = is.readRawIntLittleEndian(); 44 | if (elen == 0) return; 45 | entry = new byte[elen]; 46 | is.readByteBlockAlignedNoCRC(entry, entry.length); 47 | } 48 | 49 | /** 50 | * @see java.lang.Object#toString() 51 | */ 52 | @Override 53 | public String toString() { 54 | String s; 55 | try { 56 | s = new String(entry, "UTF-8"); 57 | } catch (final UnsupportedEncodingException e) { 58 | s = ""; 59 | } 60 | return s; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /source/de/quippy/jflac/util/ByteData.java: -------------------------------------------------------------------------------- 1 | package de.quippy.jflac.util; 2 | 3 | /** 4 | * libFLAC - Free Lossless Audio Codec library 5 | * Copyright (C) 2001,2002,2003 Josh Coalson 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | /** 24 | * Expandable byte data storage. 25 | * @author kc7bfi 26 | */ 27 | public class ByteData { 28 | private static final int DEFAULT_BUFFER_SIZE = 256; 29 | 30 | /** The byte array where data is stored. */ 31 | private final byte[] data; 32 | 33 | /** The number of bytes stored in the array. */ 34 | private int len; 35 | 36 | /** 37 | * The default constructor. 38 | * @param maxSpace The maximum space in the internal byte array. 39 | */ 40 | public ByteData(int maxSpace) { 41 | if (maxSpace <= 0) maxSpace = DEFAULT_BUFFER_SIZE; 42 | data = new byte[maxSpace]; 43 | len = 0; 44 | } 45 | 46 | /** 47 | * Append byte to storage. 48 | * @param b byte to extend 49 | */ 50 | public void append(final byte b) { 51 | data[len++] = b; 52 | } 53 | 54 | /** 55 | * @return Returns the data. 56 | */ 57 | public byte[] getData() { 58 | return data; 59 | } 60 | 61 | /** 62 | * Return a data byte. 63 | * @param idx The data byte to return 64 | * @return Returns the data. 65 | */ 66 | public byte getData(final int idx) { 67 | return data[idx]; 68 | } 69 | 70 | /** 71 | * @return Returns the len. 72 | */ 73 | public int getLen() { 74 | return len; 75 | } 76 | 77 | /** 78 | * Set the length of this ByteData object without re-allocating the underlying array. 79 | * It is not possible to set the length larger than the underlying byte array. 80 | */ 81 | public void setLen(int len) { 82 | if (len > data.length) { 83 | len = data.length; 84 | } 85 | this.len = len; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/decoder/AntiPredictorExtraHigh0000To3320.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.decoder; 21 | 22 | 23 | /** 24 | * Author: Dmitry Vaguine 25 | * Date: 04.03.2004 26 | * Time: 14:51:31 27 | */ 28 | public class AntiPredictorExtraHigh0000To3320 extends AntiPredictor { 29 | public void AntiPredict(final int[] pInputArray, final int[] pOutputArray, final int NumberOfElements, final int Iterations, final long[] pOffsetValueArrayA, final long[] pOffsetValueArrayB) { 30 | for (int z = Iterations; z >= 0; z--) { 31 | AntiPredictorOffset(pInputArray, pOutputArray, NumberOfElements, (int) pOffsetValueArrayB[z], -1, 64); 32 | AntiPredictorOffset(pOutputArray, pInputArray, NumberOfElements, (int) pOffsetValueArrayA[z], 1, 64); 33 | } 34 | 35 | AntiPredictor.antiPredict(pInputArray, pOutputArray, NumberOfElements); 36 | } 37 | 38 | private final AntiPredictorHigh0000To3320 AntiPredictor = new AntiPredictorHigh0000To3320(); 39 | 40 | protected void AntiPredictorOffset(final int[] Input_Array, final int[] Output_Array, final int Number_of_Elements, final int g, final int dm, final int Max_Order) { 41 | int q; 42 | 43 | if ((g == 0) || (Number_of_Elements <= Max_Order)) { 44 | System.arraycopy(Input_Array, 0, Output_Array, 0, Number_of_Elements); 45 | return; 46 | } 47 | 48 | System.arraycopy(Input_Array, 0, Output_Array, 0, Max_Order); 49 | 50 | if (dm > 0) 51 | for (q = Max_Order; q < Number_of_Elements; q++) { 52 | Output_Array[q] = Input_Array[q] + (Output_Array[q - g] >> 3); 53 | } 54 | else 55 | for (q = Max_Order; q < Number_of_Elements; q++) { 56 | Output_Array[q] = Input_Array[q] - (Output_Array[q - g] >> 3); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/decoder/AntiPredictorFast0000To3320.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.decoder; 21 | 22 | 23 | /** 24 | * Author: Dmitry Vaguine 25 | * Date: 04.03.2004 26 | * Time: 14:51:31 27 | */ 28 | public class AntiPredictorFast0000To3320 extends AntiPredictor { 29 | @Override 30 | public void antiPredict(final int[] pInputArray, final int[] pOutputArray, final int NumberOfElements) { 31 | 32 | //short frame handling 33 | if (NumberOfElements < 32) { 34 | System.arraycopy(pInputArray, 0, pOutputArray, 0, NumberOfElements); 35 | return; 36 | } 37 | 38 | //the initial 39 | pOutputArray[0] = pInputArray[0]; 40 | pOutputArray[1] = pInputArray[1] + pOutputArray[0]; 41 | pOutputArray[2] = pInputArray[2] + pOutputArray[1]; 42 | pOutputArray[3] = pInputArray[3] + pOutputArray[2]; 43 | pOutputArray[4] = pInputArray[4] + pOutputArray[3]; 44 | pOutputArray[5] = pInputArray[5] + pOutputArray[4]; 45 | pOutputArray[6] = pInputArray[6] + pOutputArray[5]; 46 | pOutputArray[7] = pInputArray[7] + pOutputArray[6]; 47 | 48 | //the rest 49 | int p, pw; 50 | int m = 4000; 51 | int ip, op, op1; 52 | 53 | op1 = 7; 54 | p = (pOutputArray[op1] * 2) - pOutputArray[6]; 55 | pw = (p * m) >> 12; 56 | 57 | for (op = 8, ip = 8; ip < NumberOfElements; ip++, op++, op1++) { 58 | pOutputArray[op] = pInputArray[ip] + pw; 59 | 60 | 61 | //adjust m 62 | if (pInputArray[ip] > 0) 63 | m += (p > 0) ? 4 : -4; 64 | else if (pInputArray[ip] < 0) 65 | m += (p > 0) ? -4 : 4; 66 | 67 | p = (pOutputArray[op] * 2) - pOutputArray[op1]; 68 | pw = (p * m) >> 12; 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/decoder/AntiPredictorFast3320ToCurrent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.decoder; 21 | 22 | 23 | /** 24 | * Author: Dmitry Vaguine 25 | * Date: 04.03.2004 26 | * Time: 14:51:31 27 | */ 28 | public class AntiPredictorFast3320ToCurrent extends AntiPredictor { 29 | @Override 30 | public void antiPredict(final int[] pInputArray, final int[] pOutputArray, final int NumberOfElements) { 31 | 32 | //short frame handling 33 | if (NumberOfElements < 3) { 34 | return; 35 | } 36 | 37 | //variable declares 38 | int p; 39 | int m = 375; 40 | int ip; 41 | int IP2 = pInputArray[1]; 42 | int IP3 = pInputArray[0]; 43 | int OP1 = pInputArray[1]; 44 | 45 | //the decompression loop (order 2 followed by order 1) 46 | for (ip = 2; ip < NumberOfElements; ip++) { 47 | 48 | //make a prediction for order 2 49 | p = IP2 + IP2 - IP3; 50 | 51 | //rollback the values 52 | IP3 = IP2; 53 | IP2 = pInputArray[ip] + ((p * m) >> 9); 54 | 55 | //adjust m for the order 2 56 | if ((pInputArray[ip] ^ p) > 0) 57 | m++; 58 | else 59 | m--; 60 | 61 | //set the output value 62 | pInputArray[ip] = IP2 + OP1; 63 | OP1 = pInputArray[ip]; 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/decoder/AntiPredictorHigh3320To3600.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.decoder; 21 | 22 | 23 | /** 24 | * Author: Dmitry Vaguine 25 | * Date: 04.03.2004 26 | * Time: 14:51:31 27 | */ 28 | public class AntiPredictorHigh3320To3600 extends AntiPredictor { 29 | @Override 30 | public void antiPredict(final int[] pInputArray, final int[] pOutputArray, final int NumberOfElements) { 31 | //short frame handling 32 | if (NumberOfElements < 8) { 33 | System.arraycopy(pInputArray, 0, pOutputArray, 0, NumberOfElements); 34 | return; 35 | } 36 | 37 | //do the offset anti-prediction 38 | AntiPredictorOffset.AntiPredict(pInputArray, pOutputArray, NumberOfElements, 2, 12); 39 | AntiPredictorOffset.AntiPredict(pOutputArray, pInputArray, NumberOfElements, 3, 12); 40 | 41 | AntiPredictorOffset.AntiPredict(pInputArray, pOutputArray, NumberOfElements, 4, 12); 42 | AntiPredictorOffset.AntiPredict(pOutputArray, pInputArray, NumberOfElements, 5, 12); 43 | 44 | AntiPredictorOffset.AntiPredict(pInputArray, pOutputArray, NumberOfElements, 6, 12); 45 | AntiPredictorOffset.AntiPredict(pOutputArray, pInputArray, NumberOfElements, 7, 12); 46 | 47 | 48 | //use the normal mode 49 | AntiPredictor.antiPredict(pInputArray, pOutputArray, NumberOfElements); 50 | } 51 | 52 | private final AntiPredictorOffset AntiPredictorOffset = new AntiPredictorOffset(); 53 | private final AntiPredictorNormal3320To3800 AntiPredictor = new AntiPredictorNormal3320To3800(); 54 | } 55 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/decoder/AntiPredictorOffset.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.decoder; 21 | 22 | 23 | /** 24 | * Author: Dmitry Vaguine 25 | * Date: 04.03.2004 26 | * Time: 14:51:31 27 | */ 28 | public class AntiPredictorOffset extends AntiPredictor { 29 | public void AntiPredict(final int[] pInputArray, final int[] pOutputArray, final int NumberOfElements, final int Offset, final int DeltaM) { 30 | System.arraycopy(pInputArray, 0, pOutputArray, 0, Offset); 31 | 32 | int ip = Offset; 33 | int ipo = 0; 34 | int op = Offset; 35 | int m = 0; 36 | 37 | for (; op < NumberOfElements; ip++, ipo++, op++) { 38 | pOutputArray[op] = pInputArray[ip] + ((pOutputArray[ipo] * m) >> 12); 39 | 40 | if ((pOutputArray[ipo] ^ pInputArray[ip]) > 0) 41 | m += DeltaM; 42 | else 43 | m -= DeltaM; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/decoder/DecodeValueMethod.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.decoder; 21 | 22 | /** 23 | * Author: Dmitry Vaguine 24 | * Date: 04.03.2004 25 | * Time: 14:51:31 26 | */ 27 | public class DecodeValueMethod { 28 | public final static int DECODE_VALUE_METHOD_UNSIGNED_INT = 0; 29 | public final static int DECODE_VALUE_METHOD_UNSIGNED_RICE = 1; 30 | public final static int DECODE_VALUE_METHOD_X_BITS = 2; 31 | } 32 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/decoder/RangeCoderStructDecompress.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.decoder; 21 | 22 | /** 23 | * Author: Dmitry Vaguine 24 | * Date: 04.03.2004 25 | * Time: 14:51:31 26 | */ 27 | public class RangeCoderStructDecompress { 28 | public long low; //low end of interval 29 | public long range; //length of interval 30 | public long buffer; //buffer for input/output 31 | } 32 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/decoder/UnBitArrayState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.decoder; 21 | 22 | /** 23 | * Author: Dmitry Vaguine 24 | * Date: 04.03.2004 25 | * Time: 14:51:31 26 | */ 27 | public class UnBitArrayState { 28 | public int k; 29 | public int nKSum; 30 | } 31 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/info/CompressionLevel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.info; 21 | 22 | /** 23 | * Author: Dmitry Vaguine 24 | * Date: 04.03.2004 25 | * Time: 14:51:31 26 | */ 27 | public class CompressionLevel { 28 | public final static int COMPRESSION_LEVEL_FAST = 1000; 29 | public final static int COMPRESSION_LEVEL_NORMAL = 2000; 30 | public final static int COMPRESSION_LEVEL_HIGH = 3000; 31 | public final static int COMPRESSION_LEVEL_EXTRA_HIGH = 4000; 32 | public final static int COMPRESSION_LEVEL_INSANE = 5000; 33 | } 34 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/info/SpecialFrame.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | package de.quippy.jmac.info; 20 | 21 | /** 22 | * Author: Dmitry Vaguine 23 | * Date: 11.05.2004 24 | * Time: 16:30:43 25 | */ 26 | public class SpecialFrame { 27 | public final static int SPECIAL_FRAME_MONO_SILENCE = 1; 28 | public final static int SPECIAL_FRAME_LEFT_SILENCE = 1; 29 | public final static int SPECIAL_FRAME_RIGHT_SILENCE = 2; 30 | public final static int SPECIAL_FRAME_PSEUDO_STEREO = 4; 31 | } 32 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/info/WaveFormat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.info; 21 | 22 | import java.io.IOException; 23 | 24 | import de.quippy.jmac.tools.ByteArrayReader; 25 | import de.quippy.jmac.tools.File; 26 | 27 | /** 28 | * Author: Dmitry Vaguine 29 | * Date: 04.03.2004 30 | * Time: 14:51:31 31 | */ 32 | public class WaveFormat { 33 | 34 | public short wFormatTag; /* format type */ 35 | public short nChannels; /* number of channels (i.e. mono, stereo...) */ 36 | public int nSamplesPerSec; /* sample rate */ 37 | public int nAvgBytesPerSec; /* for buffer estimation */ 38 | public short nBlockAlign; /* block size of data */ 39 | public short wBitsPerSample; /* number of bits per sample of mono data */ 40 | public short cbSize; /* the count in bytes of the size of */ 41 | 42 | public final static int WAV_HEADER_SIZE = 16; 43 | 44 | public static void FillWaveFormatEx(final WaveFormat pWaveFormatEx, final int nSampleRate, final int nBitsPerSample, final int nChannels) { 45 | pWaveFormatEx.cbSize = 0; 46 | pWaveFormatEx.nSamplesPerSec = nSampleRate; 47 | pWaveFormatEx.wBitsPerSample = (short) nBitsPerSample; 48 | pWaveFormatEx.nChannels = (short) nChannels; 49 | pWaveFormatEx.wFormatTag = 1; 50 | 51 | pWaveFormatEx.nBlockAlign = (short) ((pWaveFormatEx.wBitsPerSample / 8) * pWaveFormatEx.nChannels); 52 | pWaveFormatEx.nAvgBytesPerSec = pWaveFormatEx.nBlockAlign * pWaveFormatEx.nSamplesPerSec; 53 | } 54 | 55 | public void readHeader(final File io) throws IOException { 56 | final ByteArrayReader reader = new ByteArrayReader(io, WAV_HEADER_SIZE); 57 | wFormatTag = reader.readShort(); 58 | nChannels = reader.readShort(); 59 | nSamplesPerSec = reader.readInt(); 60 | nAvgBytesPerSec = reader.readInt(); 61 | nBlockAlign = reader.readShort(); 62 | wBitsPerSample = reader.readShort(); 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/prediction/IPredictorDecompress.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.prediction; 21 | 22 | /** 23 | * Author: Dmitry Vaguine 24 | * Date: 04.03.2004 25 | * Time: 14:51:31 26 | */ 27 | public abstract class IPredictorDecompress { 28 | public IPredictorDecompress(final int nCompressionLevel, final int nVersion) { 29 | } 30 | 31 | public int DecompressValue(final int nA) { 32 | return DecompressValue(nA, 0); 33 | } 34 | 35 | public abstract int DecompressValue(int nA, int nB); 36 | 37 | public abstract void Flush(); 38 | } 39 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/tools/IntegerPointer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | package de.quippy.jmac.tools; 20 | 21 | /** 22 | * Author: Dmitry Vaguine 23 | * Date: 02.05.2004 24 | * Time: 12:42:14 25 | */ 26 | public class IntegerPointer { 27 | 28 | public int value; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/tools/JMACException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.tools; 21 | 22 | import java.io.PrintStream; 23 | 24 | /** 25 | * Author: Dmitry Vaguine 26 | * Date: 04.03.2004 27 | * Time: 14:51:31 28 | */ 29 | public class JMACException extends RuntimeException { 30 | 31 | private static final long serialVersionUID = 2589138813867303044L; 32 | private Throwable exception; 33 | 34 | public JMACException() { 35 | } 36 | 37 | public JMACException(final String msg) { 38 | super(msg); 39 | } 40 | 41 | public JMACException(final String msg, final Throwable t) { 42 | super(msg); 43 | exception = t; 44 | } 45 | 46 | public Throwable getException() { 47 | return exception; 48 | } 49 | 50 | @Override 51 | public void printStackTrace() { 52 | printStackTrace(System.err); 53 | } 54 | 55 | @Override 56 | public void printStackTrace(final PrintStream ps) { 57 | if (this.exception == null) { 58 | super.printStackTrace(ps); 59 | } else { 60 | exception.printStackTrace(); 61 | } 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/tools/JMACSkippedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.tools; 21 | 22 | /** 23 | * Author: Dmitry Vaguine 24 | * Date: 04.03.2004 25 | * Time: 14:51:31 26 | */ 27 | public class JMACSkippedException extends Exception { 28 | 29 | private static final long serialVersionUID = 7358467373768691169L; 30 | 31 | public JMACSkippedException() { 32 | super("Skipped"); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/tools/JMACStoppedByUserException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.tools; 21 | 22 | /** 23 | * Author: Dmitry Vaguine 24 | * Date: 04.03.2004 25 | * Time: 14:51:31 26 | */ 27 | public class JMACStoppedByUserException extends Exception { 28 | 29 | private static final long serialVersionUID = -7623226716428947987L; 30 | 31 | public JMACStoppedByUserException() { 32 | super("Stopped By User"); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/tools/RollBufferFastInt.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.tools; 21 | 22 | import java.util.Arrays; 23 | 24 | /** 25 | * Author: Dmitry Vaguine 26 | * Date: 04.03.2004 27 | * Time: 14:51:31 28 | */ 29 | public class RollBufferFastInt { 30 | public RollBufferFastInt(final int nWindowElements, final int nHistoryElements) { 31 | m_pData = new int[nWindowElements + nHistoryElements]; 32 | m_nWindowElements = nWindowElements; 33 | m_nHistoryElements = nHistoryElements; 34 | windowPlusHistory = nWindowElements + nHistoryElements; 35 | Flush(); 36 | } 37 | 38 | public void Flush() { 39 | Arrays.fill(m_pData, 0, m_nHistoryElements, 0); 40 | index = m_nHistoryElements; 41 | } 42 | 43 | public void Roll() { 44 | int ai[]; 45 | int i; 46 | System.arraycopy(ai = m_pData, index - (i = m_nHistoryElements), ai, 0, i); 47 | index = i; 48 | } 49 | 50 | public void IncrementSafe() { 51 | if ((++index) == windowPlusHistory) 52 | Roll(); 53 | } 54 | 55 | public int[] m_pData; 56 | public int index; 57 | protected int m_nHistoryElements; 58 | protected int m_nWindowElements; 59 | protected int windowPlusHistory; 60 | 61 | } 62 | -------------------------------------------------------------------------------- /source/de/quippy/jmac/tools/RollBufferShort.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 21.04.2004 Original verion. davagin@udm.ru. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.jmac.tools; 21 | 22 | import java.util.Arrays; 23 | 24 | /** 25 | * Author: Dmitry Vaguine 26 | * Date: 04.03.2004 27 | * Time: 14:51:31 28 | */ 29 | public class RollBufferShort { 30 | public RollBufferShort() { 31 | m_pData = null; 32 | } 33 | 34 | public int Create(int nWindowElements, final int nHistoryElements) { 35 | m_nWindowElements = nWindowElements; 36 | m_nHistoryElements = nHistoryElements; 37 | windowPlusHistory = nWindowElements += nHistoryElements; 38 | 39 | m_pData = new short[nWindowElements]; 40 | 41 | Flush(); 42 | return 0; 43 | } 44 | 45 | public void Flush() { 46 | Arrays.fill(m_pData, 0, m_nHistoryElements, (short) 0); 47 | index = m_nHistoryElements; 48 | } 49 | 50 | public void IncrementSafe() { 51 | if ((++index) == windowPlusHistory) { 52 | short aword0[]; 53 | int i; 54 | System.arraycopy(aword0 = m_pData, index - (i = m_nHistoryElements), aword0, 0, i); 55 | index = i; 56 | } 57 | } 58 | 59 | public short[] m_pData; 60 | public int index; 61 | 62 | protected int m_nHistoryElements; 63 | protected int m_nWindowElements; 64 | protected int windowPlusHistory; 65 | } 66 | -------------------------------------------------------------------------------- /source/de/quippy/mp3/decoder/BitstreamErrors.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 11/19/04 1.0 moved to LGPL. 3 | * 11/17/04 INVALIDFRAME code added. javalayer@javazoom.net 4 | * 12/12/99 Initial version. mdm@techie.com 5 | *----------------------------------------------------------------------- 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU Library General Public License as published 8 | * by the Free Software Foundation; either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program 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 14 | * GNU Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | *---------------------------------------------------------------------- 20 | */ 21 | 22 | package de.quippy.mp3.decoder; 23 | 24 | /** 25 | * This interface describes all error codes that can be thrown 26 | * in BistreamExceptions. 27 | * 28 | * @see BitstreamException 29 | * 30 | * @author MDM 12/12/99 31 | * @since 0.0.6 32 | */ 33 | 34 | public interface BitstreamErrors extends JavaLayerErrors 35 | { 36 | 37 | /** 38 | * An undeterminable error occurred. 39 | */ 40 | static public final int UNKNOWN_ERROR = BITSTREAM_ERROR + 0; 41 | 42 | /** 43 | * The header describes an unknown sample rate. 44 | */ 45 | static public final int UNKNOWN_SAMPLE_RATE = BITSTREAM_ERROR + 1; 46 | 47 | /** 48 | * A problem occurred reading from the stream. 49 | */ 50 | static public final int STREAM_ERROR = BITSTREAM_ERROR + 2; 51 | 52 | /** 53 | * A problem occurred reading from the stream. 54 | */ 55 | static public final int STREAM_UNREAD_ERROR = BITSTREAM_ERROR + 0x12; 56 | 57 | /** 58 | * The end of the stream was reached prematurely. 59 | */ 60 | static public final int UNEXPECTED_EOF = BITSTREAM_ERROR + 3; 61 | 62 | /** 63 | * The end of the stream was reached. 64 | */ 65 | static public final int STREAM_EOF = BITSTREAM_ERROR + 4; 66 | 67 | /** 68 | * Frame data are missing. 69 | */ 70 | static public final int INVALIDFRAME = BITSTREAM_ERROR + 5; 71 | 72 | /** 73 | * 74 | */ 75 | static public final int BITSTREAM_LAST = 0x1ff; 76 | 77 | } 78 | -------------------------------------------------------------------------------- /source/de/quippy/mp3/decoder/BitstreamException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 11/19/04 1.0 moved to LGPL. 3 | * 12/12/99 Initial version. mdm@techie.com 4 | *----------------------------------------------------------------------- 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU Library General Public License as published 7 | * by the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | *---------------------------------------------------------------------- 19 | */ 20 | 21 | package de.quippy.mp3.decoder; 22 | 23 | /** 24 | * Instances of BitstreamException are thrown 25 | * when operations on a Bitstream fail. 26 | *

27 | * The exception provides details of the exception condition 28 | * in two ways: 29 | *

  1. 30 | * as an error-code describing the nature of the error 31 | *


  2. 32 | * as the Throwable instance, if any, that was thrown 33 | * indicating that an exceptional condition has occurred. 34 | *

35 | * 36 | * @since 0.0.6 37 | * @author MDM 12/12/99 38 | */ 39 | 40 | public class BitstreamException extends JavaLayerException 41 | implements BitstreamErrors 42 | { 43 | private static final long serialVersionUID = -5195786983687628551L; 44 | 45 | private int errorcode = UNKNOWN_ERROR; 46 | 47 | public BitstreamException(final String msg, final Throwable t) 48 | { 49 | super(msg, t); 50 | } 51 | 52 | public BitstreamException(final int errorcode, final Throwable t) 53 | { 54 | this(getErrorString(errorcode), t); 55 | this.errorcode = errorcode; 56 | } 57 | 58 | public int getErrorCode() 59 | { 60 | return errorcode; 61 | } 62 | 63 | 64 | static public String getErrorString(final int errorcode) 65 | { 66 | // REVIEW: use resource bundle to map error codes 67 | // to locale-sensitive strings. 68 | 69 | return "Bitstream errorcode "+Integer.toHexString(errorcode); 70 | } 71 | 72 | 73 | } 74 | -------------------------------------------------------------------------------- /source/de/quippy/mp3/decoder/Crc16.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 11/19/04 : 1.0 moved to LGPL. 3 | * 4 | * 02/12/99 : Java Conversion by E.B , javalayer@javazoom.net 5 | * 6 | * @(#) crc.h 1.5, last edit: 6/15/94 16:55:32 7 | * @(#) Copyright (C) 1993, 1994 Tobias Bading (bading@cs.tu-berlin.de) 8 | * @(#) Berlin University of Technology 9 | *----------------------------------------------------------------------- 10 | * This program is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU Library General Public License as published 12 | * by the Free Software Foundation; either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Library General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Library General Public 21 | * License along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 | *---------------------------------------------------------------------- 24 | */ 25 | package de.quippy.mp3.decoder; 26 | 27 | /** 28 | * 16-Bit CRC checksum 29 | */ 30 | public final class Crc16 31 | { 32 | private static short polynomial=(short)0x8005; 33 | private short crc; 34 | 35 | /** 36 | * Dummy Constructor 37 | */ 38 | public Crc16() 39 | { 40 | crc = (short) 0xFFFF; 41 | } 42 | 43 | /** 44 | * Feed a bitstring to the crc calculation (0 < length <= 32). 45 | */ 46 | public void add_bits (final int bitstring, final int length) 47 | { 48 | int bitmask = 1 << (length - 1); 49 | do 50 | if (((crc & 0x8000) == 0) ^ ((bitstring & bitmask) == 0 )) 51 | { 52 | crc <<= 1; 53 | crc ^= polynomial; 54 | } 55 | else 56 | crc <<= 1; 57 | while ((bitmask >>>= 1) != 0); 58 | } 59 | 60 | /** 61 | * Return the calculated checksum. 62 | * Erase it for next calls to add_bits(). 63 | */ 64 | public short checksum() 65 | { 66 | final short sum = crc; 67 | crc = (short) 0xFFFF; 68 | return sum; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /source/de/quippy/mp3/decoder/DecoderErrors.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 11/19/04 1.0 moved to LGPL. 3 | * 01/12/99 Initial version. mdm@techie.com 4 | *----------------------------------------------------------------------- 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU Library General Public License as published 7 | * by the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | *---------------------------------------------------------------------- 19 | */ 20 | 21 | package de.quippy.mp3.decoder; 22 | 23 | /** 24 | * This interface provides constants describing the error 25 | * codes used by the Decoder to indicate errors. 26 | * 27 | * @author MDM 28 | */ 29 | public interface DecoderErrors extends JavaLayerErrors 30 | { 31 | 32 | static public final int UNKNOWN_ERROR = DECODER_ERROR + 0; 33 | 34 | /** 35 | * Layer not supported by the decoder. 36 | */ 37 | static public final int UNSUPPORTED_LAYER = DECODER_ERROR + 1; 38 | } 39 | -------------------------------------------------------------------------------- /source/de/quippy/mp3/decoder/DecoderException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 11/19/04 1.0 moved to LGPL. 3 | * 01/12/99 Initial version. mdm@techie.com 4 | *----------------------------------------------------------------------- 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU Library General Public License as published 7 | * by the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | *---------------------------------------------------------------------- 19 | */ 20 | 21 | package de.quippy.mp3.decoder; 22 | 23 | /** 24 | * The DecoderException represents the class of 25 | * errors that can occur when decoding MPEG audio. 26 | * 27 | * @author MDM 28 | */ 29 | public class DecoderException extends JavaLayerException 30 | implements DecoderErrors 31 | { 32 | private static final long serialVersionUID = 739129173366217466L; 33 | 34 | private int errorcode = UNKNOWN_ERROR; 35 | 36 | public DecoderException(final String msg, final Throwable t) 37 | { 38 | super(msg, t); 39 | } 40 | 41 | public DecoderException(final int errorcode, final Throwable t) 42 | { 43 | this(getErrorString(errorcode), t); 44 | this.errorcode = errorcode; 45 | } 46 | 47 | public int getErrorCode() 48 | { 49 | return errorcode; 50 | } 51 | 52 | 53 | static public String getErrorString(final int errorcode) 54 | { 55 | // REVIEW: use resource file to map error codes 56 | // to locale-sensitive strings. 57 | 58 | return "Decoder errorcode "+Integer.toHexString(errorcode); 59 | } 60 | 61 | 62 | } 63 | 64 | -------------------------------------------------------------------------------- /source/de/quippy/mp3/decoder/FrameDecoder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 11/19/04 1.0 moved to LGPL. 3 | * 12/12/99 Initial version. mdm@techie.com 4 | *----------------------------------------------------------------------- 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU Library General Public License as published 7 | * by the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | *---------------------------------------------------------------------- 19 | */ 20 | 21 | package de.quippy.mp3.decoder; 22 | 23 | /** 24 | * Implementations of FrameDecoder are responsible for decoding 25 | * an MPEG audio frame. 26 | * 27 | */ 28 | //REVIEW: the interface currently is too thin. There should be 29 | // methods to specify the output buffer, the synthesis filters and 30 | // possibly other objects used by the decoder. 31 | public interface FrameDecoder 32 | { 33 | /** 34 | * Decodes one frame of MPEG audio. 35 | */ 36 | public void decodeFrame(); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /source/de/quippy/mp3/decoder/JavaLayerErrors.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 11/19/04 1.0 moved to LGPL. 3 | * 12/12/99 Initial version. mdm@techie.com 4 | *----------------------------------------------------------------------- 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU Library General Public License as published 7 | * by the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | *---------------------------------------------------------------------- 19 | */ 20 | 21 | package de.quippy.mp3.decoder; 22 | 23 | /** 24 | * Exception erorr codes for components of the JavaLayer API. 25 | */ 26 | public interface JavaLayerErrors 27 | { 28 | /** 29 | * The first bitstream error code. See the {@link DecoderErrors DecoderErrors} 30 | * interface for other bitstream error codes. 31 | */ 32 | static public final int BITSTREAM_ERROR = 0x100; 33 | 34 | /** 35 | * The first decoder error code. See the {@link DecoderErrors DecoderErrors} 36 | * interface for other decoder error codes. 37 | */ 38 | static public final int DECODER_ERROR = 0x200; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /source/de/quippy/mp3/decoder/JavaLayerException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 11/19/04 1.0 moved to LGPL. 3 | * 12/12/99 Initial version. mdm@techie.com 4 | *----------------------------------------------------------------------- 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU Library General Public License as published 7 | * by the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | *---------------------------------------------------------------------- 19 | */ 20 | 21 | package de.quippy.mp3.decoder; 22 | 23 | import java.io.PrintStream; 24 | 25 | 26 | /** 27 | * The JavaLayerException is the base class for all API-level 28 | * exceptions thrown by JavaLayer. To facilitate conversion and 29 | * common handling of exceptions from other domains, the class 30 | * can delegate some functionality to a contained Throwable instance. 31 | *

32 | * 33 | * @author MDM 34 | */ 35 | public class JavaLayerException extends Exception 36 | { 37 | private static final long serialVersionUID = 7212135786131434159L; 38 | 39 | private Throwable exception; 40 | 41 | 42 | public JavaLayerException() 43 | { 44 | } 45 | 46 | public JavaLayerException(final String msg) 47 | { 48 | super(msg); 49 | } 50 | 51 | public JavaLayerException(final String msg, final Throwable t) 52 | { 53 | super(msg); 54 | exception = t; 55 | } 56 | 57 | public Throwable getException() 58 | { 59 | return exception; 60 | } 61 | 62 | 63 | @Override 64 | public void printStackTrace() 65 | { 66 | printStackTrace(System.err); 67 | } 68 | 69 | @Override 70 | public void printStackTrace(final PrintStream ps) 71 | { 72 | if (this.exception==null) 73 | { 74 | super.printStackTrace(ps); 75 | } 76 | else 77 | { 78 | exception.printStackTrace(); 79 | } 80 | } 81 | 82 | 83 | } 84 | -------------------------------------------------------------------------------- /source/de/quippy/mp3/decoder/JavaLayerHook.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 11/19/04 1.0 moved to LGPL. 3 | *----------------------------------------------------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU Library General Public License as published 6 | * by the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | *---------------------------------------------------------------------- 18 | */ 19 | 20 | package de.quippy.mp3.decoder; 21 | 22 | import java.io.InputStream; 23 | 24 | /** 25 | * The JavaLayerHooks class allows developers to change 26 | * the way the JavaLayer library uses Resources. 27 | */ 28 | 29 | public interface JavaLayerHook 30 | { 31 | /** 32 | * Retrieves the named resource. This allows resources to be 33 | * obtained without specifying how they are retrieved. 34 | */ 35 | public InputStream getResourceAsStream(String name); 36 | } 37 | -------------------------------------------------------------------------------- /source/de/quippy/mp3/decoder/sfd.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/mp3/decoder/sfd.ser -------------------------------------------------------------------------------- /source/de/quippy/ogg/jogg/Packet.java: -------------------------------------------------------------------------------- 1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ 2 | /* JOrbis 3 | * Copyright (C) 2000 ymnk, JCraft,Inc. 4 | * 5 | * Written by: 2000 ymnk 6 | * 7 | * Many thanks to 8 | * Monty and 9 | * The XIPHOPHORUS Company http://www.xiph.org/ . 10 | * JOrbis has been based on their awesome works, Vorbis codec. 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Library General Public License 14 | * as published by the Free Software Foundation; either version 2 of 15 | * the License, or (at your option) any later version. 16 | 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Library General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Library General Public 23 | * License along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 | */ 26 | 27 | package de.quippy.ogg.jogg; 28 | 29 | public class Packet{ 30 | public byte[] packet_base; 31 | public int packet; 32 | public int bytes; 33 | public int b_o_s; 34 | public int e_o_s; 35 | 36 | public long granulepos; 37 | 38 | /** 39 | * sequence number for decode; the framing 40 | * knows where there's a hole in the data, 41 | * but we need coupling so that the codec 42 | * (which is in a seperate abstraction 43 | * layer) also knows about the gap 44 | */ 45 | public long packetno; 46 | 47 | } 48 | -------------------------------------------------------------------------------- /source/de/quippy/ogg/jorbis/ChainingExample.java: -------------------------------------------------------------------------------- 1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ 2 | /* JOrbis 3 | * Copyright (C) 2000 ymnk, JCraft,Inc. 4 | * 5 | * Written by: 2000 ymnk 6 | * 7 | * Many thanks to 8 | * Monty and 9 | * The XIPHOPHORUS Company http://www.xiph.org/ . 10 | * JOrbis has been based on their awesome works, Vorbis codec. 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Library General Public License 14 | * as published by the Free Software Foundation; either version 2 of 15 | * the License, or (at your option) any later version. 16 | 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Library General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Library General Public 23 | * License along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 | */ 26 | 27 | package de.quippy.ogg.jorbis; 28 | 29 | class ChainingExample{ 30 | public static void main(final String[] arg){ 31 | VorbisFile ov=null; 32 | 33 | try{ 34 | if(arg.length>0){ 35 | ov=new VorbisFile(arg[0]); 36 | } 37 | else{ 38 | ov=new VorbisFile(System.in, null, -1); 39 | } 40 | } 41 | catch(final Exception e){ 42 | System.err.println(e); 43 | return; 44 | } 45 | 46 | if(ov.seekable()){ 47 | System.out.println("Input bitstream contained "+ov.streams() 48 | +" logical bitstream section(s)."); 49 | System.out.println("Total bitstream playing time: "+ov.time_total(-1) 50 | +" seconds\n"); 51 | } 52 | else{ 53 | System.out.println("Standard input was not seekable."); 54 | System.out.println("First logical bitstream information:\n"); 55 | } 56 | 57 | for(int i=0; i 6 | * 7 | * Many thanks to 8 | * Monty and 9 | * The XIPHOPHORUS Company http://www.xiph.org/ . 10 | * JOrbis has been based on their awesome works, Vorbis codec. 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Library General Public License 14 | * as published by the Free Software Foundation; either version 2 of 15 | * the License, or (at your option) any later version. 16 | 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Library General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Library General Public 23 | * License along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 | */ 26 | 27 | package de.quippy.ogg.jorbis; 28 | 29 | import de.quippy.ogg.jogg.Buffer; 30 | 31 | abstract class FuncFloor{ 32 | 33 | public static FuncFloor[] floor_P= {new Floor0(), new Floor1()}; 34 | 35 | abstract void pack(Object i, Buffer opb); 36 | 37 | abstract Object unpack(Info vi, Buffer opb); 38 | 39 | abstract Object look(DspState vd, InfoMode mi, Object i); 40 | 41 | abstract void free_info(Object i); 42 | 43 | abstract void free_look(Object i); 44 | 45 | abstract void free_state(Object vs); 46 | 47 | abstract int forward(Block vb, Object i, float[] in, float[] out, Object vs); 48 | 49 | abstract Object inverse1(Block vb, Object i, Object memo); 50 | 51 | abstract int inverse2(Block vb, Object i, Object memo, float[] out); 52 | } 53 | -------------------------------------------------------------------------------- /source/de/quippy/ogg/jorbis/FuncMapping.java: -------------------------------------------------------------------------------- 1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ 2 | /* JOrbis 3 | * Copyright (C) 2000 ymnk, JCraft,Inc. 4 | * 5 | * Written by: 2000 ymnk 6 | * 7 | * Many thanks to 8 | * Monty and 9 | * The XIPHOPHORUS Company http://www.xiph.org/ . 10 | * JOrbis has been based on their awesome works, Vorbis codec. 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Library General Public License 14 | * as published by the Free Software Foundation; either version 2 of 15 | * the License, or (at your option) any later version. 16 | 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Library General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Library General Public 23 | * License along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 | */ 26 | 27 | package de.quippy.ogg.jorbis; 28 | 29 | import de.quippy.ogg.jogg.Buffer; 30 | 31 | abstract class FuncMapping{ 32 | public static FuncMapping[] mapping_P= {new Mapping0()}; 33 | 34 | abstract void pack(Info info, Object imap, Buffer buffer); 35 | 36 | abstract Object unpack(Info info, Buffer buffer); 37 | 38 | abstract Object look(DspState vd, InfoMode vm, Object m); 39 | 40 | abstract void free_info(Object imap); 41 | 42 | abstract void free_look(Object imap); 43 | 44 | abstract int inverse(Block vd, Object lm); 45 | } 46 | -------------------------------------------------------------------------------- /source/de/quippy/ogg/jorbis/FuncResidue.java: -------------------------------------------------------------------------------- 1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ 2 | /* JOrbis 3 | * Copyright (C) 2000 ymnk, JCraft,Inc. 4 | * 5 | * Written by: 2000 ymnk 6 | * 7 | * Many thanks to 8 | * Monty and 9 | * The XIPHOPHORUS Company http://www.xiph.org/ . 10 | * JOrbis has been based on their awesome works, Vorbis codec. 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Library General Public License 14 | * as published by the Free Software Foundation; either version 2 of 15 | * the License, or (at your option) any later version. 16 | 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Library General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Library General Public 23 | * License along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 | */ 26 | 27 | package de.quippy.ogg.jorbis; 28 | 29 | import de.quippy.ogg.jogg.Buffer; 30 | 31 | abstract class FuncResidue{ 32 | public static FuncResidue[] residue_P= {new Residue0(), new Residue1(), 33 | new Residue2()}; 34 | 35 | abstract void pack(Object vr, Buffer opb); 36 | 37 | abstract Object unpack(Info vi, Buffer opb); 38 | 39 | abstract Object look(DspState vd, InfoMode vm, Object vr); 40 | 41 | abstract void free_info(Object i); 42 | 43 | abstract void free_look(Object i); 44 | 45 | abstract int inverse(Block vb, Object vl, float[][] in, int[] nonzero, int ch); 46 | } 47 | -------------------------------------------------------------------------------- /source/de/quippy/ogg/jorbis/FuncTime.java: -------------------------------------------------------------------------------- 1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ 2 | /* JOrbis 3 | * Copyright (C) 2000 ymnk, JCraft,Inc. 4 | * 5 | * Written by: 2000 ymnk 6 | * 7 | * Many thanks to 8 | * Monty and 9 | * The XIPHOPHORUS Company http://www.xiph.org/ . 10 | * JOrbis has been based on their awesome works, Vorbis codec. 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Library General Public License 14 | * as published by the Free Software Foundation; either version 2 of 15 | * the License, or (at your option) any later version. 16 | 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Library General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Library General Public 23 | * License along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 | */ 26 | 27 | package de.quippy.ogg.jorbis; 28 | 29 | import de.quippy.ogg.jogg.Buffer; 30 | 31 | abstract class FuncTime{ 32 | public static FuncTime[] time_P= {new Time0()}; 33 | 34 | abstract void pack(Object i, Buffer opb); 35 | 36 | abstract Object unpack(Info vi, Buffer opb); 37 | 38 | abstract Object look(DspState vd, InfoMode vm, Object i); 39 | 40 | abstract void free_info(Object i); 41 | 42 | abstract void free_look(Object i); 43 | 44 | abstract int inverse(Block vb, Object i, float[] in, float[] out); 45 | } 46 | -------------------------------------------------------------------------------- /source/de/quippy/ogg/jorbis/InfoMode.java: -------------------------------------------------------------------------------- 1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ 2 | /* JOrbis 3 | * Copyright (C) 2000 ymnk, JCraft,Inc. 4 | * 5 | * Written by: 2000 ymnk 6 | * 7 | * Many thanks to 8 | * Monty and 9 | * The XIPHOPHORUS Company http://www.xiph.org/ . 10 | * JOrbis has been based on their awesome works, Vorbis codec. 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Library General Public License 14 | * as published by the Free Software Foundation; either version 2 of 15 | * the License, or (at your option) any later version. 16 | 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Library General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Library General Public 23 | * License along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 | */ 26 | 27 | package de.quippy.ogg.jorbis; 28 | 29 | class InfoMode{ 30 | int blockflag; 31 | int windowtype; 32 | int transformtype; 33 | int mapping; 34 | } 35 | -------------------------------------------------------------------------------- /source/de/quippy/ogg/jorbis/JOrbisException.java: -------------------------------------------------------------------------------- 1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ 2 | /* JOrbis 3 | * Copyright (C) 2000 ymnk, JCraft,Inc. 4 | * 5 | * Written by: 2000 ymnk 6 | * 7 | * Many thanks to 8 | * Monty and 9 | * The XIPHOPHORUS Company http://www.xiph.org/ . 10 | * JOrbis has been based on their awesome works, Vorbis codec. 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Library General Public License 14 | * as published by the Free Software Foundation; either version 2 of 15 | * the License, or (at your option) any later version. 16 | 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Library General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Library General Public 23 | * License along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 | */ 26 | 27 | package de.quippy.ogg.jorbis; 28 | 29 | public class JOrbisException extends Exception{ 30 | 31 | private static final long serialVersionUID=1L; 32 | 33 | public JOrbisException(){ 34 | super(); 35 | } 36 | 37 | public JOrbisException(final String s){ 38 | super("JOrbis: "+s); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /source/de/quippy/ogg/jorbis/PsyInfo.java: -------------------------------------------------------------------------------- 1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ 2 | /* JOrbis 3 | * Copyright (C) 2000 ymnk, JCraft,Inc. 4 | * 5 | * Written by: 2000 ymnk 6 | * 7 | * Many thanks to 8 | * Monty and 9 | * The XIPHOPHORUS Company http://www.xiph.org/ . 10 | * JOrbis has been based on their awesome works, Vorbis codec. 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Library General Public License 14 | * as published by the Free Software Foundation; either version 2 of 15 | * the License, or (at your option) any later version. 16 | 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Library General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Library General Public 23 | * License along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 | */ 26 | 27 | package de.quippy.ogg.jorbis; 28 | 29 | // psychoacoustic setup 30 | class PsyInfo{ 31 | // int athp; 32 | // int decayp; 33 | // int smoothp; 34 | // int noisefitp; 35 | // int noisefit_subblock; 36 | // float noisefit_threshdB; 37 | // 38 | // float ath_att; 39 | // 40 | // int tonemaskp; 41 | // float[] toneatt_125Hz=new float[5]; 42 | // float[] toneatt_250Hz=new float[5]; 43 | // float[] toneatt_500Hz=new float[5]; 44 | // float[] toneatt_1000Hz=new float[5]; 45 | // float[] toneatt_2000Hz=new float[5]; 46 | // float[] toneatt_4000Hz=new float[5]; 47 | // float[] toneatt_8000Hz=new float[5]; 48 | // 49 | // int peakattp; 50 | // float[] peakatt_125Hz=new float[5]; 51 | // float[] peakatt_250Hz=new float[5]; 52 | // float[] peakatt_500Hz=new float[5]; 53 | // float[] peakatt_1000Hz=new float[5]; 54 | // float[] peakatt_2000Hz=new float[5]; 55 | // float[] peakatt_4000Hz=new float[5]; 56 | // float[] peakatt_8000Hz=new float[5]; 57 | // 58 | // int noisemaskp; 59 | // float[] noiseatt_125Hz=new float[5]; 60 | // float[] noiseatt_250Hz=new float[5]; 61 | // float[] noiseatt_500Hz=new float[5]; 62 | // float[] noiseatt_1000Hz=new float[5]; 63 | // float[] noiseatt_2000Hz=new float[5]; 64 | // float[] noiseatt_4000Hz=new float[5]; 65 | // float[] noiseatt_8000Hz=new float[5]; 66 | // 67 | // float max_curve_dB; 68 | // 69 | // float attack_coeff; 70 | // float decay_coeff; 71 | 72 | // void free(){ 73 | // } 74 | } 75 | -------------------------------------------------------------------------------- /source/de/quippy/ogg/jorbis/PsyLook.java: -------------------------------------------------------------------------------- 1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ 2 | /* JOrbis 3 | * Copyright (C) 2000 ymnk, JCraft,Inc. 4 | * 5 | * Written by: 2000 ymnk 6 | * 7 | * Many thanks to 8 | * Monty and 9 | * The XIPHOPHORUS Company http://www.xiph.org/ . 10 | * JOrbis has been based on their awesome works, Vorbis codec. 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Library General Public License 14 | * as published by the Free Software Foundation; either version 2 of 15 | * the License, or (at your option) any later version. 16 | 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Library General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Library General Public 23 | * License along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 | */ 26 | 27 | package de.quippy.ogg.jorbis; 28 | 29 | class PsyLook{ 30 | // int n; 31 | // PsyInfo vi; 32 | // 33 | // float[][][] tonecurves; 34 | // float[][] peakatt; 35 | // float[][][] noisecurves; 36 | // 37 | // float[] ath; 38 | // int[] octave; 39 | 40 | // void init(PsyInfo vi, int n, int rate){ 41 | // } 42 | } 43 | -------------------------------------------------------------------------------- /source/de/quippy/ogg/jorbis/Residue1.java: -------------------------------------------------------------------------------- 1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ 2 | /* JOrbis 3 | * Copyright (C) 2000 ymnk, JCraft,Inc. 4 | * 5 | * Written by: 2000 ymnk 6 | * 7 | * Many thanks to 8 | * Monty and 9 | * The XIPHOPHORUS Company http://www.xiph.org/ . 10 | * JOrbis has been based on their awesome works, Vorbis codec. 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Library General Public License 14 | * as published by the Free Software Foundation; either version 2 of 15 | * the License, or (at your option) any later version. 16 | 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Library General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Library General Public 23 | * License along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 | */ 26 | 27 | package de.quippy.ogg.jorbis; 28 | 29 | class Residue1 extends Residue0{ 30 | 31 | @Override 32 | int inverse(final Block vb, final Object vl, final float[][] in, final int[] nonzero, final int ch){ 33 | int used=0; 34 | for(int i=0; i 6 | * 7 | * Many thanks to 8 | * Monty and 9 | * The XIPHOPHORUS Company http://www.xiph.org/ . 10 | * JOrbis has been based on their awesome works, Vorbis codec. 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Library General Public License 14 | * as published by the Free Software Foundation; either version 2 of 15 | * the License, or (at your option) any later version. 16 | 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Library General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Library General Public 23 | * License along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 | */ 26 | 27 | package de.quippy.ogg.jorbis; 28 | 29 | class Residue2 extends Residue0{ 30 | 31 | @Override 32 | int inverse(final Block vb, final Object vl, final float[][] in, final int[] nonzero, final int ch){ 33 | int i=0; 34 | for(i=0; i 6 | * 7 | * Many thanks to 8 | * Monty and 9 | * The XIPHOPHORUS Company http://www.xiph.org/ . 10 | * JOrbis has been based on their awesome works, Vorbis codec. 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU Library General Public License 14 | * as published by the Free Software Foundation; either version 2 of 15 | * the License, or (at your option) any later version. 16 | 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Library General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Library General Public 23 | * License along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 25 | */ 26 | 27 | package de.quippy.ogg.jorbis; 28 | 29 | import de.quippy.ogg.jogg.Buffer; 30 | 31 | class Time0 extends FuncTime{ 32 | @Override 33 | void pack(final Object i, final Buffer opb){ 34 | } 35 | 36 | @Override 37 | Object unpack(final Info vi, final Buffer opb){ 38 | return ""; 39 | } 40 | 41 | @Override 42 | Object look(final DspState vd, final InfoMode mi, final Object i){ 43 | return ""; 44 | } 45 | 46 | @Override 47 | void free_info(final Object i){ 48 | } 49 | 50 | @Override 51 | void free_look(final Object i){ 52 | } 53 | 54 | @Override 55 | int inverse(final Block vb, final Object i, final float[] in, final float[] out){ 56 | return 0; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /source/de/quippy/ogg/jorbis/Util.java: -------------------------------------------------------------------------------- 1 | package de.quippy.ogg.jorbis; 2 | 3 | class Util{ 4 | static int ilog(int v){ 5 | int ret=0; 6 | while(v!=0){ 7 | ret++; 8 | v>>>=1; 9 | } 10 | return (ret); 11 | } 12 | 13 | static int ilog2(int v){ 14 | int ret=0; 15 | while(v>1){ 16 | ret++; 17 | v>>>=1; 18 | } 19 | return (ret); 20 | } 21 | 22 | static int icount(int v){ 23 | int ret=0; 24 | while(v!=0){ 25 | ret+=(v&1); 26 | v>>>=1; 27 | } 28 | return (ret); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/Config.java: -------------------------------------------------------------------------------- 1 | package de.quippy.sidplay.libsidplay; 2 | 3 | public class Config { 4 | 5 | public final static String PACKAGE_NAME = "libsidplay"; 6 | 7 | public final static String PACKAGE_VERSION = "2.1.1"; 8 | 9 | public final static String S_A_WHITE_EMAIL = "sidplay2@yahoo.com"; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/NullSID.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Null SID Emulation 3 | * ------------------ 4 | * begin : Thurs Sep 20 2001 5 | * copyright : (C) 2001 by Simon White 6 | * email : s_a_white@email.com 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * @author Ken H�ndel 14 | * 15 | */ 16 | package de.quippy.sidplay.libsidplay; 17 | 18 | import de.quippy.sidplay.libsidplay.common.SIDEmu; 19 | 20 | public class NullSID extends SIDEmu 21 | { 22 | public NullSID() 23 | { 24 | super(null); 25 | } 26 | 27 | // 28 | // Standard component functions 29 | // 30 | 31 | @Override 32 | public void reset() 33 | { 34 | super.reset(); 35 | } 36 | 37 | @Override 38 | public void reset(final short /* uint8_t */volume) 39 | { 40 | } 41 | 42 | @Override 43 | public short /* uint8_t */read(final short /* uint_least8_t */addr) 44 | { 45 | return 0; 46 | } 47 | 48 | @Override 49 | public void write(final short /* uint_least8_t */addr, final short /* uint8_t */data) 50 | { 51 | } 52 | 53 | @Override 54 | public final String credits() 55 | { 56 | return ""; 57 | } 58 | 59 | @Override 60 | public final String error() 61 | { 62 | return ""; 63 | } 64 | 65 | // 66 | // Standard SID functions 67 | // 68 | 69 | @Override 70 | public long /* int_least32_t */output(final short /* uint_least8_t */volume) 71 | { 72 | return 0; 73 | } 74 | 75 | @Override 76 | public void voice(final short /* uint_least8_t */num, final short /* uint_least8_t */vol, final boolean mute) 77 | { 78 | } 79 | 80 | @Override 81 | public void gain(final short /* uint_least8_t */percent) 82 | { 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/SIDPlay2.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Public de.quippy.sidplay.sidplay header 3 | * --------------------- 4 | * begin : Fri Jun 9 2000 5 | * copyright : (C) 2000 by Simon White 6 | * email : s_a_white@email.com 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * @author Ken H�ndel 14 | * 15 | */ 16 | package de.quippy.sidplay.libsidplay; 17 | 18 | import static de.quippy.sidplay.libsidplay.Player.SID2_TIME_BASE; 19 | 20 | import de.quippy.sidplay.libsidplay.common.ISID2Types.sid2_config_t; 21 | import de.quippy.sidplay.libsidplay.common.ISID2Types.sid2_info_t; 22 | import de.quippy.sidplay.libsidplay.common.ISID2Types.sid2_player_t; 23 | import de.quippy.sidplay.libsidplay.components.sidtune.SidTune; 24 | 25 | public class SIDPlay2 { 26 | 27 | private final Player sidplayer; 28 | 29 | public SIDPlay2() { 30 | sidplayer = new Player(); 31 | } 32 | 33 | public final sid2_config_t config() { 34 | return sidplayer.config(); 35 | } 36 | 37 | public final sid2_info_t info() { 38 | return sidplayer.info(); 39 | } 40 | 41 | public int config(final sid2_config_t cfg) { 42 | return sidplayer.config(cfg); 43 | } 44 | 45 | public final String error() { 46 | return sidplayer.error(); 47 | } 48 | 49 | public int fastForward(final int percent) { 50 | return sidplayer.fastForward(percent); 51 | } 52 | 53 | public int load(final SidTune tune) { 54 | return sidplayer.load(tune); 55 | } 56 | 57 | public void pause() { 58 | sidplayer.pause(); 59 | } 60 | 61 | public long /* uint_least32_t */play(final short[] buffer, 62 | final int /* uint_least32_t */length) { 63 | return sidplayer.play(buffer, length); 64 | } 65 | 66 | public final sid2_player_t state() { 67 | return sidplayer.state(); 68 | } 69 | 70 | public void stop() { 71 | sidplayer.stop(); 72 | } 73 | 74 | public void debug(final boolean enable) { 75 | sidplayer.debug(enable); 76 | } 77 | 78 | public final long /* uint_least32_t */timebase() { 79 | return SID2_TIME_BASE; 80 | } 81 | 82 | public final long /* uint_least32_t */time() { 83 | return sidplayer.time(); 84 | } 85 | 86 | public final long /* uint_least32_t */mileage() { 87 | return sidplayer.mileage(); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/common/C64Env.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The C64 environment interface. 3 | * ------------------------------ 4 | * begin : Fri Apr 4 2001 5 | * copyright : (C) 2001 by Simon White 6 | * email : s_a_white@email.com 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * @author Ken H�ndel 14 | * 15 | */ 16 | package de.quippy.sidplay.libsidplay.common; 17 | 18 | /** 19 | * An implementation of of this class can be created to perform the C64 20 | * specifics. A pointer to this child class can then be passed to each of the 21 | * Components so they can interact with it. 22 | */ 23 | public abstract class C64Env { 24 | 25 | private final IEventContext m_context; 26 | 27 | public C64Env(final IEventContext context) { 28 | m_context = (context); 29 | } 30 | 31 | public final IEventContext context() { 32 | return m_context; 33 | } 34 | 35 | public abstract void interruptIRQ(boolean state); 36 | 37 | public abstract void interruptNMI(); 38 | 39 | public abstract void interruptRST(); 40 | 41 | public abstract void signalAEC(boolean state); 42 | 43 | public abstract short /* uint8_t */readMemRamByte( 44 | int /* uint_least16_t */addr); 45 | 46 | public abstract void sid2crc(short /* uint8_t */data); 47 | 48 | public abstract void lightpen(); 49 | 50 | } 51 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/common/Event.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Event scheduler (based on alarm from Vice) 3 | * ------------------------------------------ 4 | * begin : Wed May 9 2001 5 | * copyright : (C) 2001 by Simon White 6 | * email : s_a_white@email.com 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * @author Ken H�ndel 14 | * 15 | */ 16 | package de.quippy.sidplay.libsidplay.common; 17 | 18 | public abstract class Event { 19 | 20 | public enum event_phase_t { 21 | EVENT_CLOCK_PHI1, EVENT_CLOCK_PHI2 22 | } 23 | 24 | public static final int EVENT_CONTEXT_MAX_PENDING_EVENTS = 0x100; 25 | 26 | public final String m_name; 27 | 28 | public long /* event_clock_t */m_clk; 29 | 30 | /** 31 | * This variable is set by the event context when it is scheduled 32 | */ 33 | public boolean m_pending; 34 | 35 | /** 36 | * Link to the next and previous events in the list. 37 | */ 38 | public Event m_next, m_prev; 39 | 40 | public Event(final String name) { 41 | m_name = name; 42 | m_pending = false; 43 | } 44 | 45 | public abstract void event(); 46 | 47 | public boolean pending() { 48 | return m_pending; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/common/IComponent.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Standard IC interface functions 3 | * ------------------------------- 4 | * begin : Fri Apr 4 2001 5 | * copyright : (C) 2001 by Simon White 6 | * email : s_a_white@email.com 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * @author Ken H�ndel 14 | * 15 | */ 16 | package de.quippy.sidplay.libsidplay.common; 17 | 18 | public interface IComponent { 19 | 20 | void reset(); 21 | 22 | short /* uint8_t */read(short /* uint_least8_t */addr); 23 | 24 | void write(short /* uint_least8_t */addr, short /* uint_least8_t */data); 25 | 26 | String credits(); 27 | 28 | String error(); 29 | } 30 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/common/IEventContext.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Event scheduler (based on alarm from Vice) 3 | * ------------------------------------------ 4 | * begin : Wed May 9 2001 5 | * copyright : (C) 2001 by Simon White 6 | * email : s_a_white@email.com 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * @author Ken H�ndel 14 | * 15 | */ 16 | package de.quippy.sidplay.libsidplay.common; 17 | 18 | import de.quippy.sidplay.libsidplay.common.Event.event_phase_t; 19 | 20 | /** 21 | * @author Ken H�ndel 22 | * 23 | * Public Event Context 24 | */ 25 | public interface IEventContext { 26 | 27 | void cancel(Event event); 28 | 29 | void schedule(Event event, long /* event_clock_t */cycles, 30 | event_phase_t phase); 31 | 32 | long /* event_clock_t */getTime(event_phase_t phase); 33 | 34 | long /* event_clock_t */getTime(long /* event_clock_t */clock, 35 | event_phase_t phase); 36 | 37 | event_phase_t phase(); 38 | } 39 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/common/SIDBuilder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Sid Builder Classes 3 | * ------------------- 4 | * begin : Sat May 6 2001 5 | * copyright : (C) 2001 by Simon White 6 | * email : s_a_white@email.com 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * @author Ken H�ndel 14 | * 15 | */ 16 | package de.quippy.sidplay.libsidplay.common; 17 | 18 | import de.quippy.sidplay.libsidplay.common.ISID2Types.sid2_model_t; 19 | 20 | /** 21 | * @author Ken H�ndel 22 | * 23 | * Inherit this class to create a new SID emulations for libsidplay2. 24 | */ 25 | public abstract class SIDBuilder { 26 | private final String m_name; 27 | 28 | /** 29 | * Determine current state of object (true = okay, false = error). 30 | */ 31 | protected boolean m_status; 32 | 33 | public SIDBuilder(final String name) { 34 | m_name = (name); 35 | m_status = (true); 36 | } 37 | 38 | public abstract SIDEmu lock(C64Env env, sid2_model_t model); 39 | 40 | public abstract void unlock(SIDEmu device); 41 | 42 | public final String name() { 43 | return m_name; 44 | } 45 | 46 | public abstract String error(); 47 | 48 | public abstract String credits(); 49 | 50 | public final boolean bool() { 51 | return m_status; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/common/SIDEmu.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Sid Builder Classes 3 | * ------------------- 4 | * begin : Sat May 6 2001 5 | * copyright : (C) 2001 by Simon White 6 | * email : s_a_white@email.com 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * @author Ken H�ndel 14 | * 15 | */ 16 | package de.quippy.sidplay.libsidplay.common; 17 | 18 | public abstract class SIDEmu implements IComponent { 19 | 20 | private final SIDBuilder m_builder; 21 | 22 | public SIDEmu(final SIDBuilder builder) { 23 | m_builder = (builder); 24 | } 25 | 26 | // 27 | // Standard component functions 28 | // 29 | 30 | @Override 31 | public void reset() { 32 | reset((short) 0); 33 | } 34 | 35 | public abstract void reset(short /* uint8_t */volume); 36 | 37 | @Override 38 | public abstract short /* uint8_t */read(short /* uint_least8_t */addr); 39 | 40 | @Override 41 | public abstract void write(short /* uint_least8_t */addr, 42 | short /* uint8_t */data); 43 | 44 | @Override 45 | public abstract String credits(); 46 | 47 | // 48 | // Standard SID functions 49 | // 50 | 51 | public abstract long /* int_least32_t */output( 52 | short /* uint_least8_t */bits); 53 | 54 | public abstract void voice(short /* uint_least8_t */num, 55 | short /* uint_least8_t */vol, boolean mute); 56 | 57 | public abstract void gain(short /* uint_least8_t */precent); 58 | 59 | public void optimisation(final byte /* uint_least8_t */level) { 60 | 61 | } 62 | 63 | final public SIDBuilder builder() { 64 | return m_builder; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/common/mos6510/C64Environment.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This is the environment file which 3 | * defines all the standard functions 4 | * to be inherited by the ICs. 5 | * ---------------------------------- 6 | * begin : Thu May 11 2000 7 | * copyright : (C) 2000 by Simon White 8 | * email : s_a_white@email.com 9 | * 10 | * This program is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation; either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * @author Ken H�ndel 16 | * 17 | */ 18 | package de.quippy.sidplay.libsidplay.common.mos6510; 19 | 20 | public class C64Environment { 21 | 22 | /** 23 | * Sidplay2 Player Environment 24 | */ 25 | private C64Environment m_envp; 26 | 27 | public void setEnvironment (final C64Environment envp) { 28 | m_envp = envp; 29 | } 30 | 31 | // 32 | // Environment functions 33 | // 34 | 35 | protected void envReset() { 36 | m_envp.envReset(); 37 | } 38 | 39 | protected short /* uint8_t */envReadMemByte(final int /* uint_least16_t */addr) { 40 | return m_envp.envReadMemByte(addr); 41 | } 42 | 43 | protected void envWriteMemByte(final int /* uint_least16_t */addr, 44 | final short /* uint8_t */data) { 45 | m_envp.envWriteMemByte(addr, data); 46 | } 47 | 48 | // 49 | // Interrupts 50 | // 51 | 52 | protected void envTriggerIRQ() { 53 | m_envp.envTriggerIRQ(); 54 | } 55 | 56 | protected void envTriggerNMI() { 57 | m_envp.envTriggerNMI(); 58 | } 59 | 60 | protected void envTriggerRST() { 61 | m_envp.envTriggerRST(); 62 | } 63 | 64 | protected void envClearIRQ() { 65 | m_envp.envClearIRQ(); 66 | } 67 | 68 | // 69 | // Sidplay compatibly functions 70 | // 71 | 72 | protected boolean envCheckBankJump(final int /* uint_least16_t */addr) { 73 | return m_envp.envCheckBankJump(addr); 74 | } 75 | 76 | protected short /* uint8_t */envReadMemDataByte(final int /* uint_least16_t */addr) { 77 | return m_envp.envReadMemDataByte(addr); 78 | } 79 | 80 | protected void envSleep() { 81 | m_envp.envSleep(); 82 | } 83 | 84 | protected void envLoadFile(final String file) { 85 | m_envp.envLoadFile(file); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/common/mos6510/IConf6510.java: -------------------------------------------------------------------------------- 1 | /** 2 | * description 3 | * ----------- 4 | * begin : Thu May 11 2000 5 | * copyright : (C) 2000 by Simon White 6 | * email : s_a_white@email.com 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * @author Ken H�ndel 14 | * 15 | */ 16 | package de.quippy.sidplay.libsidplay.common.mos6510; 17 | 18 | public interface IConf6510 { 19 | 20 | boolean MOS6510_CYCLE_BASED = true; 21 | 22 | boolean MOS6510_ACCURATE_CYCLES = true; 23 | 24 | boolean SIDPLAY = true; 25 | 26 | boolean MOS6510_STATE_6510 = false; 27 | 28 | boolean NO_RTS_UPON_BRK = false; 29 | } 30 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/components/mos6526/C64CIA.java: -------------------------------------------------------------------------------- 1 | /** 2 | * C64 CIAs 3 | * -------- 4 | * begin : Fri Apr 4 2001 5 | * copyright : (C) 2000 by Simon White 6 | * email : s_a_white@email.com 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * @author Ken H�ndel 14 | * 15 | */ 16 | package de.quippy.sidplay.libsidplay.components.mos6526; 17 | 18 | import de.quippy.sidplay.libsidplay.common.C64Env; 19 | 20 | /** 21 | * The CIA emulations are very generic and here we need to effectively wire them 22 | * into the computer (like adding a chip to a PCB). 23 | * 24 | * @author Ken H�ndel 25 | * 26 | */ 27 | public class C64CIA { 28 | 29 | /** 30 | * CIA 1 specifics: Generates IRQs 31 | */ 32 | public static class C64cia1 extends MOS6526 { 33 | private final C64Env m_env; 34 | 35 | private short /* uint8_t */lp; 36 | 37 | @Override 38 | public void interrupt(final boolean state) { 39 | m_env.interruptIRQ(state); 40 | } 41 | 42 | @Override 43 | public void portA() { 44 | } 45 | 46 | @Override 47 | public void portB() { 48 | final short /* uint8_t */lp = (short) ((regs[PRB] /* prb */| (~regs[DDRB] /* ddrb */& 0xff)) & 0x10); 49 | if (lp != this.lp) 50 | m_env.lightpen(); 51 | this.lp = lp; 52 | } 53 | 54 | public C64cia1(final C64Env env) { 55 | super(env.context()); 56 | m_env = (env); 57 | } 58 | 59 | @Override 60 | public final String error() { 61 | return ""; 62 | } 63 | 64 | @Override 65 | public void reset() { 66 | lp = 0x10; 67 | super.reset(); 68 | } 69 | } 70 | 71 | /** 72 | * CIA 2 specifics: Generates NMIs 73 | */ 74 | public static class C64cia2 extends MOS6526 { 75 | private final C64Env m_env; 76 | 77 | @Override 78 | public void portA() { 79 | } 80 | 81 | @Override 82 | public void portB() { 83 | } 84 | 85 | @Override 86 | public void interrupt(final boolean state) { 87 | if (state) 88 | m_env.interruptNMI(); 89 | } 90 | 91 | public C64cia2(final C64Env env) { 92 | super((env.context())); 93 | m_env = (env); 94 | } 95 | 96 | @Override 97 | public final String error() { 98 | return ""; 99 | } 100 | } 101 | 102 | } 103 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/components/mos656x/C64VIC.java: -------------------------------------------------------------------------------- 1 | /** 2 | * C64 VIC 3 | * ------- 4 | * begin : Fri Apr 4 2001 5 | * copyright : (C) 2001 by Simon White 6 | * email : s_a_white@email.com 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * @author Ken H�ndel 14 | * 15 | */ 16 | package de.quippy.sidplay.libsidplay.components.mos656x; 17 | 18 | import de.quippy.sidplay.libsidplay.common.C64Env; 19 | 20 | /** 21 | * The VIC emulation is very generic and here we need to effectively wire it 22 | * into the computer (like adding a chip to a PCB). 23 | * 24 | * @author Ken H�ndel 25 | * 26 | */ 27 | public class C64VIC extends MOS656X { 28 | 29 | private final C64Env m_env; 30 | 31 | @Override 32 | protected void interrupt(final boolean state) { 33 | m_env.interruptIRQ(state); 34 | } 35 | 36 | @Override 37 | protected void addrctrl(final boolean state) { 38 | m_env.signalAEC(state); 39 | } 40 | 41 | public C64VIC(final C64Env env) { 42 | super((env.context())); 43 | m_env = (env); 44 | } 45 | 46 | @Override 47 | public final String error() { 48 | return ""; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/components/sidtune/Buffer_sidtt.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This program is free software; you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation; either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software 14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 | */ 16 | package de.quippy.sidplay.libsidplay.components.sidtune; 17 | 18 | public class Buffer_sidtt { 19 | public Buffer_sidtt() { 20 | dummy = (0); 21 | kill(); 22 | } 23 | 24 | public Buffer_sidtt(final short[] inBuf, final int /* uint_least32_t */inLen) { 25 | dummy = (0); 26 | kill(); 27 | if (inBuf != null && inLen != 0) { 28 | buf = inBuf; 29 | bufLen = inLen; 30 | } 31 | } 32 | 33 | public boolean assign(final short[] newBuf, final int /* uint_least32_t */newLen) { 34 | erase(); 35 | buf = newBuf; 36 | bufLen = newLen; 37 | return (buf != null); 38 | } 39 | 40 | public final short[] get() { 41 | return buf; 42 | } 43 | 44 | public final int /* uint_least32_t */len() { 45 | return bufLen; 46 | } 47 | 48 | public short[] xferPtr() { 49 | final short[] tmpBuf = buf; 50 | buf = null; 51 | return tmpBuf; 52 | } 53 | 54 | public int /* uint_least32_t */xferLen() { 55 | final int /* uint_least32_t */tmpBufLen = bufLen; 56 | bufLen = 0; 57 | return tmpBufLen; 58 | } 59 | 60 | public short opAt(final int /* uint_least32_t */index) { 61 | if (index < bufLen) 62 | return buf[index]; 63 | else 64 | return dummy; 65 | } 66 | 67 | public final boolean isEmpty() { 68 | return (buf == null); 69 | } 70 | 71 | public void erase() { 72 | if (buf != null && bufLen != 0) { 73 | buf = null; 74 | } 75 | kill(); 76 | } 77 | 78 | private short[] buf; 79 | 80 | private int /* uint_least32_t */bufLen; 81 | 82 | private final short dummy; 83 | 84 | private void kill() { 85 | buf = null; 86 | bufLen = 0; 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/components/sidtune/ISidTuneCfg.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This program is free software; you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation; either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software 14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 | */ 16 | package de.quippy.sidplay.libsidplay.components.sidtune; 17 | 18 | public interface ISidTuneCfg { 19 | 20 | /** 21 | * Define to add PSID2NG support 22 | */ 23 | boolean SIDTUNE_PSID2NG = true; 24 | 25 | /** 26 | * Minimum load address for real c64 only tunes 27 | */ 28 | int SIDTUNE_R64_MIN_LOAD_ADDR = 0x07e8; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/components/sidtune/Prg.java: -------------------------------------------------------------------------------- 1 | /** 2 | * C64 PRG file format support. 3 | * ---------------------------- 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | package de.quippy.sidplay.libsidplay.components.sidtune; 19 | 20 | import static de.quippy.sidplay.libsidplay.components.sidtune.SidTune.SIDTUNE_COMPATIBILITY_BASIC; 21 | import static de.quippy.sidplay.libsidplay.components.sidtune.SidTune.LoadStatus.LOAD_ERROR; 22 | import static de.quippy.sidplay.libsidplay.components.sidtune.SidTune.LoadStatus.LOAD_NOT_MINE; 23 | import static de.quippy.sidplay.libsidplay.components.sidtune.SidTune.LoadStatus.LOAD_OK; 24 | 25 | import de.quippy.sidplay.libsidplay.components.sidtune.SidTune.LoadStatus; 26 | 27 | public class Prg { 28 | 29 | private static final String _sidtune_format_prg = "Tape image file (PRG)"; 30 | 31 | private static final String _sidtune_truncated = "ERROR: File is most likely truncated"; 32 | 33 | private final SidTune sidtune; 34 | 35 | private final SidTuneInfo info; 36 | 37 | public Prg(final SidTune sidTune) { 38 | this.sidtune = sidTune; 39 | this.info = sidTune.info; 40 | } 41 | 42 | protected LoadStatus PRG_fileSupport(final String fileName, 43 | final Buffer_sidtt /* Buffer_sidtt& */dataBuf) { 44 | final int lastIndexOf = fileName.lastIndexOf("."); 45 | final String ext = lastIndexOf != -1 ? fileName.substring(lastIndexOf) : ""; 46 | if (!ext.equalsIgnoreCase(".prg") && !ext.equalsIgnoreCase(".c64")) { 47 | return LOAD_NOT_MINE; 48 | } 49 | 50 | info.formatString = _sidtune_format_prg; 51 | if (dataBuf.len() < 2) { 52 | info.formatString = _sidtune_truncated; 53 | return LOAD_ERROR; 54 | } 55 | 56 | // Automatic settings 57 | info.songs = 1; 58 | info.startSong = 1; 59 | info.compatibility = SIDTUNE_COMPATIBILITY_BASIC; 60 | info.numberOfInfoStrings = 0; 61 | 62 | // Create the speed/clock setting table. 63 | sidtune.convertOldStyleSpeedToTables(~0, info.clockSpeed); 64 | return LOAD_OK; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/components/sidtune/SmartPtr_sidtt.java: -------------------------------------------------------------------------------- 1 | package de.quippy.sidplay.libsidplay.components.sidtune; 2 | 3 | public class SmartPtr_sidtt extends SmartPtrBase_sidtt { 4 | 5 | public SmartPtr_sidtt(final short[] buffer, final int bufferLen, final boolean bufOwner) { 6 | super(buffer, bufferLen, bufOwner); 7 | } 8 | 9 | public SmartPtr_sidtt() { 10 | super(null, 0, false); 11 | } 12 | 13 | public SmartPtr_sidtt(final short[] buffer, final int fileOffset, final int bufferLen) { 14 | super(buffer, bufferLen - fileOffset, false); 15 | pBufCurrent = fileOffset; 16 | } 17 | 18 | public void setBuffer(final short[] buffer, final int bufferLen) { 19 | if (bufferLen >= 1) { 20 | pBufCurrent = 0; 21 | bufEnd = bufferLen; 22 | bufLen = bufferLen; 23 | status = true; 24 | } else { 25 | pBufCurrent = bufEnd = 0; 26 | bufLen = 0; 27 | status = false; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/libsidplay/mem/IPSIDDrv.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This program is free software; you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation; either version 3 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software 14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 | */ 16 | package de.quippy.sidplay.libsidplay.mem; 17 | 18 | public interface IPSIDDrv { 19 | public static final short[] PSIDDRV = { 20 | 0x01, 0x00, 0x6f, 0x36, 0x35, 0x00, 0x00, 0x00, 21 | 0x00, 0x10, 0xc3, 0x00, 0x00, 0x04, 0x00, 0x00, 22 | 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 23 | 0x00, 0x00, 0x00, 0x1d, 0x10, 0xb1, 0x10, 0xc2, 24 | 0x10, 0xc2, 0x10, 0x89, 0x10, 0x00, 0x00, 0x00, 25 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 26 | 0x00, 0x00, 0x6c, 0x0e, 0x10, 0x6c, 0x0c, 0x10, 27 | 0x78, 0xac, 0xa6, 0x02, 0xad, 0x14, 0x10, 0x8d, 28 | 0xa6, 0x02, 0x48, 0x20, 0x84, 0xff, 0x68, 0x8c, 29 | 0xa6, 0x02, 0xa2, 0x9b, 0xa0, 0x37, 0x4d, 0x15, 30 | 0x10, 0x0d, 0x12, 0x10, 0xf0, 0x04, 0xa2, 0x1b, 31 | 0xa0, 0x00, 0x8e, 0x11, 0xd0, 0x8c, 0x12, 0xd0, 32 | 0xad, 0x13, 0x10, 0xf0, 0x05, 0xa9, 0x9b, 0x8d, 33 | 0x14, 0x03, 0xae, 0x10, 0x10, 0xac, 0x11, 0x10, 34 | 0xe8, 0xc8, 0xca, 0xd0, 0xfd, 0x88, 0xd0, 0xfa, 35 | 0xad, 0x0b, 0x10, 0xd0, 0x10, 0xa9, 0x7f, 0x8d, 36 | 0x0d, 0xdc, 0xad, 0x19, 0xd0, 0x8d, 0x19, 0xd0, 37 | 0xa9, 0x81, 0x8d, 0x1a, 0xd0, 0xad, 0x0d, 0xdc, 38 | 0xad, 0x12, 0x10, 0xd0, 0x02, 0xa9, 0x37, 0x85, 39 | 0x01, 0xad, 0x16, 0x10, 0x48, 0xad, 0x0a, 0x10, 40 | 0x28, 0x20, 0x1a, 0x10, 0xad, 0x12, 0x10, 0xf0, 41 | 0x0a, 0xad, 0x13, 0x10, 0xf0, 0x04, 0xa9, 0x37, 42 | 0x85, 0x01, 0x58, 0x4c, 0x98, 0x10, 0xa5, 0x01, 43 | 0x48, 0xad, 0x13, 0x10, 0x85, 0x01, 0xa9, 0x00, 44 | 0x20, 0x17, 0x10, 0x68, 0x85, 0x01, 0xad, 0x19, 45 | 0xd0, 0x8d, 0x19, 0xd0, 0xad, 0x12, 0x10, 0xd0, 46 | 0x03, 0x4c, 0x31, 0xea, 0xad, 0x0d, 0xdc, 0x68, 47 | 0xa8, 0x68, 0xaa, 0x68, 0x40, 0x02, 0x00, 0x00, 48 | 0x01, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 49 | 0x02, 0x82, 0x10, 0x82, 0x03, 0x82, 0x07, 0x82, 50 | 0x12, 0x82, 0x03, 0x82, 0x0f, 0x82, 0x05, 0x22, 51 | 0x05, 0x82, 0x03, 0x82, 0x0b, 0x82, 0x18, 0x82, 52 | 0x09, 0x82, 0x04, 0x82, 0x04, 0x82, 0x03, 0x82, 53 | 0x05, 0x82, 0x0a, 0x82, 0x06, 0x82, 0x07, 0x82, 54 | 0x0c, 0x82, 0x00, 0x00, 0x00, 0x00, 55 | }; 56 | } 57 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/resid_builder/resid/ISIDDefs.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is part of reSID, a MOS6581 SID emulator engine. 3 | * Copyright (C) 1999 Dag Lem 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * @author Ken H�ndel 20 | * 21 | */ 22 | package de.quippy.sidplay.resid_builder.resid; 23 | 24 | public interface ISIDDefs { 25 | 26 | // We could have used the smallest possible data type for each SID register, 27 | // however this would give a slower engine because of data type conversions. 28 | // An int is assumed to be at least 32 bits (necessary in the types reg24, 29 | // cycle_count, and sound_sample). GNU does not support 16-bit machines 30 | // (GNU Coding Standards: Portability between CPUs), so this should be 31 | // a valid assumption. 32 | 33 | // typedef unsigned int reg4; 34 | // typedef unsigned int reg8; 35 | // typedef unsigned int reg12; 36 | // typedef unsigned int reg16; 37 | // typedef unsigned int reg24; 38 | 39 | // typedef int cycle_count; 40 | // typedef int sound_sample; 41 | // typedef sound_sample fc_point[2]; 42 | 43 | public enum chip_model { 44 | MOS6581, MOS8580 45 | } 46 | public enum sampling_method { 47 | SAMPLE_FAST, SAMPLE_INTERPOLATE, SAMPLE_RESAMPLE_INTERPOLATE, SAMPLE_RESAMPLE_FAST 48 | } 49 | public static final String resid_version_string = "0.15"; 50 | } 51 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/resid_builder/resid/PointPlotter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is part of reSID, a MOS6581 SID emulator engine. 3 | * Copyright (C) 2004 Dag Lem 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * @author Ken H�ndel 20 | * 21 | */ 22 | package de.quippy.sidplay.resid_builder.resid; 23 | 24 | /** 25 | * Class for plotting integers into an array. 26 | * 27 | * @author Ken H�ndel 28 | * 29 | */ 30 | public class PointPlotter { 31 | 32 | protected int /* sound_sample */f[]; 33 | 34 | public PointPlotter(final int /* sound_sample */arr[]) { 35 | this.f = arr; 36 | } 37 | 38 | void plot(final double x, double y) { 39 | // Clamp negative values to zero. 40 | if (y < 0) { 41 | y = 0; 42 | } 43 | 44 | f[(int) x] = (int /* sound_sample */) y; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/resid_builder/resid/Potentiometer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is part of reSID, a MOS6581 SID emulator engine. 3 | * Copyright (C) 2004 Dag Lem 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * @author Ken H�ndel 20 | * 21 | */ 22 | package de.quippy.sidplay.resid_builder.resid; 23 | 24 | public class Potentiometer { 25 | public int /* reg8 */readPOT() { 26 | // NB! Not modeled. 27 | return 0xff; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /source/de/quippy/sidplay/resid_builder/resid/WAVE6581_P_T: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/sidplay/resid_builder/resid/WAVE6581_P_T -------------------------------------------------------------------------------- /source/de/quippy/sidplay/resid_builder/resid/WAVE8580_PST: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/sidplay/resid_builder/resid/WAVE8580_PST -------------------------------------------------------------------------------- /source/de/quippy/sidplay/resid_builder/resid/WAVE8580_PS_: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/sidplay/resid_builder/resid/WAVE8580_PS_ -------------------------------------------------------------------------------- /source/de/quippy/sidplay/resid_builder/resid/WAVE8580_P_T: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/sidplay/resid_builder/resid/WAVE8580_P_T -------------------------------------------------------------------------------- /source/de/quippy/sidplay/resid_builder/resid/WAVE8580__ST: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quippy-git/javamod/d7c6562817a6ffb2444b2431401b1b730479ec63/source/de/quippy/sidplay/resid_builder/resid/WAVE8580__ST -------------------------------------------------------------------------------- /source/de/quippy/sidplay/resid_builder/sid_filter_t.java: -------------------------------------------------------------------------------- 1 | package de.quippy.sidplay.resid_builder; 2 | 3 | public class sid_filter_t { 4 | public int /* sid_fc_t */cutoff[][] = new int[0x800][2]; 5 | 6 | public int /* uint_least16_t */points; 7 | 8 | public int /* int32_t */Lthreshold, Lsteepness, Llp, Lbp, Lhp; 9 | public int /* int32_t */Hthreshold, Hsteepness, Hlp, Hbp, Hhp; 10 | 11 | } --------------------------------------------------------------------------------