Commit ef761a92 authored by bret curtis's avatar bret curtis

Imported Upstream version 0.3.1

parents
language: c
compiler:
- gcc
- clang
branches:
only:
- master
before_install:
- pwd
- git submodule update --init --recursive
- echo "yes" | sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
- sudo apt-get update -qq
- sudo apt-get install -qq libgtest-dev google-mock
- sudo apt-get install -qq libasound2-dev
- sudo mkdir /usr/src/gtest/build
- cd /usr/src/gtest/build
- sudo cmake .. -DBUILD_SHARED_LIBS=1
- sudo make -j4
- sudo ln -s /usr/src/gtest/build/libgtest.so /usr/lib/libgtest.so
- sudo ln -s /usr/src/gtest/build/libgtest_main.so /usr/lib/libgtest_main.so
before_script:
- cd -
- mkdir debug
- cd debug
- cmake ..
- cd -
- mkdir release
- cd release
- cmake -D CMAKE_BUILD_TYPE=Release ..
- cd -
script:
- make -j2 -C ./debug
- make -j2 -C ./release
#after_script:
# - ./runtests
notifications:
recipients:
- psi29a+travis.ci@gmail.com
email:
on_success: change
on_failure: always
# ########## Project setup ##########
PROJECT(wildmidi)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
# Version
set (WILDMIDI_VERSION_MAJOR 0)
set (WILDMIDI_VERSION_MINOR 3)
set (WILDMIDI_VERSION_RELEASE 0)
set (WILDMIDI_VERSION "${WILDMIDI_VERSION_MAJOR}.${WILDMIDI_VERSION_MINOR}.${WILDMIDI_VERSION_RELEASE}")
# Find Macros
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
# Set a default build type if none was specified
if(NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
message(STATUS "Setting build type to 'Debug' as none was specified.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
endif()
SET(CMAKE_CONFIGURATION_TYPES "${CMAKE_BUILD_TYPE}")
MESSAGE(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
# Are we linking against libwildmidi statically?
option(WILDMIDI_STATIC "Link WildMIDI to the static libwildmidi library" FALSE)
# Compiler specific settings
if(CMAKE_COMPILER_IS_GNUCC)
add_definitions( -std=c99 -D_POSIX_C_SOURCE=200809L -pedantic -Wall -Wextra -W )
ENDIF(CMAKE_COMPILER_IS_GNUCC)
# default config locaiton
SET(WILDMIDI_CFG "wildmidi.cfg")
# UNIX-like environments
IF(NOT WIN32 AND NOT APPLE)
# go looking for available sound packages
find_package(ALSA)
if(ALSA_FOUND)
add_definitions( -DHAVE_ALSA=1 )
else(ALSA_FOUND)
find_package(OSS)
if(OSS_FOUND)
add_definitions( -DHAVE_LINUX_SOUNDCARD_H=1 )
endif()
endif()
# find our math lib
find_library(M_LIBRARY m)
# set our default linux config
SET(WILDMIDI_CFG "/etc/wildmidi/wildmidi.cfg")
## Debian and non debian Linux building
IF (DPKG_PROGRAM)
## Debian specific
ELSE ()
## Non debian specific
ENDIF (DPKG_PROGRAM)
ENDIF(NOT WIN32 AND NOT APPLE)
IF (APPLE)
FIND_LIBRARY(COREAUDIO_LIBRARY CoreAudio)
FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation )
ENDIF (APPLE)
IF (WIN32)
LINK_LIBRARIES(winmm)
ENDIF (WIN32)
#add_definitions( -static )
# ######### General setup ##########
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} include ${ALSA_INCLUDE_DIR})
if (APPLE)
set(APP_BUNDLE_NAME "${CMAKE_PROJECT_NAME}.app")
set(APP_BUNDLE_DIR "${wildmidi_BINARY_DIR}/${APP_BUNDLE_NAME}")
endif (APPLE)
if (APPLE)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${APP_BUNDLE_DIR}/Contents/MacOS")
else (APPLE)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${wildmidi_BINARY_DIR}")
endif (APPLE)
add_subdirectory(src)
\ No newline at end of file
For the player see docs/GPLv3.txt
For the library see docs/LGPLv3.txt
-- new todo
We're under new management!
Convert to cmake asap
Update with latest patches
Fix typos
Get this working on windows visual studios
harmonize with linux
-- old todo
Remove malloc from GetOutput
Add function to support "live" midi events
Add midi hardware support in player
# - Try to find ALSA
# Once done, this will define
#
# ALSA_FOUND - system has ALSA (GL and GLU)
# ALSA_INCLUDE_DIRS - the ALSA include directories
# ALSA_LIBRARIES - link these to use ALSA
# ALSA_GL_LIBRARY - only GL
# ALSA_GLU_LIBRARY - only GLU
#
# See documentation on how to write CMake scripts at
# http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries
include(LibFindMacros)
libfind_pkg_check_modules(ALSA_PKGCONF alsa)
find_path(ALSA_INCLUDE_DIR
NAMES alsa/version.h
PATHS ${ALSA_PKGCONF_INCLUDE_DIRS}
)
find_library(ALSA_LIBRARY
NAMES asound
PATHS ${ALSA_PKGCONF_LIBRARY_DIRS}
)
# Extract the version number
IF(ALSA_INCLUDE_DIR)
file(READ "${ALSA_INCLUDE_DIR}/alsa/version.h" _ALSA_VERSION_H_CONTENTS)
string(REGEX REPLACE ".*#define SND_LIB_VERSION_STR[ \t]*\"([^\n]*)\".*" "\\1" ALSA_VERSION "${_ALSA_VERSION_H_CONTENTS}")
ENDIF(ALSA_INCLUDE_DIR)
set(ALSA_PROCESS_INCLUDES ALSA_INCLUDE_DIR)
set(ALSA_PROCESS_LIBS ALSA_LIBRARY)
libfind_process(ALSA)
# - Find Oss
# Find Oss headers and libraries.
#
# OSS_INCLUDE_DIR - where to find soundcard.h, etc.
# OSS_FOUND - True if Oss found.
include(LibFindMacros)
FIND_PATH(LINUX_OSS_INCLUDE_DIR "linux/soundcard.h"
"/usr/include" "/usr/local/include"
)
FIND_PATH(SYS_OSS_INCLUDE_DIR "sys/soundcard.h"
"/usr/include" "/usr/local/include"
)
FIND_PATH(MACHINE_OSS_INCLUDE_DIR "machine/soundcard.h"
"/usr/include" "/usr/local/include"
)
SET(OSS_FOUND FALSE)
IF(LINUX_OSS_INCLUDE_DIR)
SET(OSS_FOUND TRUE)
SET(OSS_INCLUDE_DIR ${LINUX_OSS_INCLUDE_DIR})
SET(HAVE_LINUX_SOUNDCARD_H 1)
ENDIF()
IF(SYS_OSS_INCLUDE_DIR)
SET(OSS_FOUND TRUE)
SET(OSS_INCLUDE_DIR ${SYS_OSS_INCLUDE_DIR})
SET(HAVE_SYS_SOUNDCARD_H 1)
ENDIF()
IF(MACHINE_OSS_INCLUDE_DIR)
SET(OSS_FOUND TRUE)
SET(OSS_INCLUDE_DIR ${MACHINE_OSS_INCLUDE_DIR})
SET(HAVE_MACHINE_SOUNDCARD_H 1)
ENDIF()
MARK_AS_ADVANCED (
OSS_FOUND
OSS_INCLUDE_DIR
LINUX_OSS_INCLUDE_DIR
SYS_OSS_INCLUDE_DIR
MACHINE_OSS_INCLUDE_DIR
)
IF(OSS_FOUND)
MESSAGE(STATUS "Found OSS headers...")
ENDIF()
libfind_pkg_check_modules(OSS_PKGCONF oss)
# Works the same as find_package, but forwards the "REQUIRED" and "QUIET" arguments
# used for the current package. For this to work, the first parameter must be the
# prefix of the current package, then the prefix of the new package etc, which are
# passed to find_package.
macro (libfind_package PREFIX)
set (LIBFIND_PACKAGE_ARGS ${ARGN})
if (${PREFIX}_FIND_QUIETLY)
set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} QUIET)
endif (${PREFIX}_FIND_QUIETLY)
if (${PREFIX}_FIND_REQUIRED)
set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} REQUIRED)
endif (${PREFIX}_FIND_REQUIRED)
find_package(${LIBFIND_PACKAGE_ARGS})
endmacro (libfind_package)
# CMake developers made the UsePkgConfig system deprecated in the same release (2.6)
# where they added pkg_check_modules. Consequently I need to support both in my scripts
# to avoid those deprecated warnings. Here's a helper that does just that.
# Works identically to pkg_check_modules, except that no checks are needed prior to use.
macro (libfind_pkg_check_modules PREFIX PKGNAME)
if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
include(UsePkgConfig)
pkgconfig(${PKGNAME} ${PREFIX}_INCLUDE_DIRS ${PREFIX}_LIBRARY_DIRS ${PREFIX}_LDFLAGS ${PREFIX}_CFLAGS)
else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(${PREFIX} ${PKGNAME})
endif (PKG_CONFIG_FOUND)
endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
endmacro (libfind_pkg_check_modules)
# Do the final processing once the paths have been detected.
# If include dirs are needed, ${PREFIX}_PROCESS_INCLUDES should be set to contain
# all the variables, each of which contain one include directory.
# Ditto for ${PREFIX}_PROCESS_LIBS and library files.
# Will set ${PREFIX}_FOUND, ${PREFIX}_INCLUDE_DIRS and ${PREFIX}_LIBRARIES.
# Also handles errors in case library detection was required, etc.
macro (libfind_process PREFIX)
# Skip processing if already processed during this run
if (NOT ${PREFIX}_FOUND)
# Start with the assumption that the library was found
set (${PREFIX}_FOUND TRUE)
# Process all includes and set _FOUND to false if any are missing
foreach (i ${${PREFIX}_PROCESS_INCLUDES})
if (${i})
set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${i}})
mark_as_advanced(${i})
else (${i})
set (${PREFIX}_FOUND FALSE)
endif (${i})
endforeach (i)
# Process all libraries and set _FOUND to false if any are missing
foreach (i ${${PREFIX}_PROCESS_LIBS})
if (${i})
set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${i}})
mark_as_advanced(${i})
else (${i})
set (${PREFIX}_FOUND FALSE)
endif (${i})
endforeach (i)
# Print message and/or exit on fatal error
if (${PREFIX}_FOUND)
if (NOT ${PREFIX}_FIND_QUIETLY)
message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}")
endif (NOT ${PREFIX}_FIND_QUIETLY)
else (${PREFIX}_FOUND)
if (${PREFIX}_FIND_REQUIRED)
foreach (i ${${PREFIX}_PROCESS_INCLUDES} ${${PREFIX}_PROCESS_LIBS})
message("${i}=${${i}}")
endforeach (i)
message (FATAL_ERROR "Required library ${PREFIX} NOT FOUND.\nInstall the library (dev version) and try again. If the library is already installed, use ccmake to set the missing variables manually.")
endif (${PREFIX}_FIND_REQUIRED)
endif (${PREFIX}_FOUND)
endif (NOT ${PREFIX}_FOUND)
endmacro (libfind_process)
macro(libfind_library PREFIX basename)
set(TMP "")
if(MSVC80)
set(TMP -vc80)
endif(MSVC80)
if(MSVC90)
set(TMP -vc90)
endif(MSVC90)
set(${PREFIX}_LIBNAMES ${basename}${TMP})
if(${ARGC} GREATER 2)
set(${PREFIX}_LIBNAMES ${basename}${TMP}-${ARGV2})
string(REGEX REPLACE "\\." "_" TMP ${${PREFIX}_LIBNAMES})
set(${PREFIX}_LIBNAMES ${${PREFIX}_LIBNAMES} ${TMP})
endif(${ARGC} GREATER 2)
find_library(${PREFIX}_LIBRARY
NAMES ${${PREFIX}_LIBNAMES}
PATHS ${${PREFIX}_PKGCONF_LIBRARY_DIRS}
)
endmacro(libfind_library)
This diff is collapsed.
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
.TH wildmidi 1 "05 June 2010" "" "WildMidi Player"
.SH NAME
wildmidi \- example player for libWildMidi
.PP
.SH LIBRARY
.B libWildMidi
.PP
.SH FILES
.B /etc/wildmidi.cfg
.PP
.SH SYNOPSIS
.B wildmidi [-behlv] [-c \fIconfig-file\fB] [-d \fIdevice\fB] [-m \fIvolume-level\fB] [-o \fIwav-file\fB] \fImidifile ...
.PP
.SH DESCRIPTION
This is a demonstration program to show the capabilities of libWildMidi.
.PP
\fImidifile\fP is processed by libWildMidi and the resulting audio is output by the player.
.PP
You can have more than one \fImidifile\fB on the command line and \fBwildmidi\fP will pass them to libWildMidi for processing, one after the other. You can also use wildcards, for example: \fBwildmidi *.mid\fP
.PP
.SH OPTIONS
.IP "\fB\-b\fP | \fB\-\-reverb\fP"
Turns on an 8 point reverb engine that adds depth to the final mix.
.P
.IP "\fB\-c\fP \fIconfig-file\fP | \fB\-\-config_file\fP \fIconfig\-file\fP"
Uses the configuration file stated by \fIconfig\-file\fP instead of /etc/wildmidi.cfg
.PP
.IP "\fB\-d\fP \fIdevice\fP | \fB\-\-auddev=\fIdevice\fP"
Send the audio to \fIdevice\fP instead of the default. ALSA defaults to the system "default" while OSS defaults to "/dev/dsp". Win32 environments ignore this option.
.PP
.IP "\fB\-e\fP | \fB\-\-enhanced_resample\fP"
Switches to a gauss based resampling algorithm which can improve the shape of the sound.
.PP
.IP "\fB\-h\fP | \fB\-\-help\fP"
Displays command line options
.PP
.IP "\fB\-l\fP | \fB\-\-log_vol\fP"
Some MIDI files have been recorded on hardware that uses a volume curve, making them sound really badly mixed on other MIDI devices. Use this option to use volume curves.
.PP
.IP "\fB\-m\fP \fIvolume\-level\fP | \fB\-\-master_volume=\fIvolume\-level\fP"
Set the overall volume level to \fIvolume\-level\fP. The minimum is 0 and the maximum is 127, with the default being 100.
.PP
.IP "\fB\-o\fP \fIwav\-file\fP | \fB\-\-wavout=\fIwav\-file\fP"
Records the audio in wav format to \fIwav-file\fP.
.PP
.IP "\fB\-r\fP \fIsndrate\fP | \fB\-\-rate=\fIsndrate\fP"
Set the audio output rate to \fIsndrate\fP. The default rate is 32072.
.PP
.IP "\fB\-v\fP | \fB\-\-version\fP"
Display version and copyright information
.PP
.SH TEST OPTIONS
These options are not designed for general use. Instead these options are designed to make it easier to listen to specific sound samples.
.PP
Note: These options are not displayed by \fB\-h\fP | \fB\-\-help\fP
.PP
.IP "\fB-k\fP \fIN\fP | \fB\-\-test_bank=\fIN\fP"
Set the test bank to \fIN\fP. Range is 0 to 127.
.PP
.IP "\fB\-p\fP \fIN\fP | \fB\-\-test_patch=\fIN\fP"
Set the test patch to \fIN\fP. Range is 0 to 127.
.PP
.IP "\fB\-t\fP | \fB\-\-test_midi\fP"
Plays the built in test midi which plays all 127 notes.
.PP
.SH USER INTERFACE
The player accepts limited user input that allows some interaction while playing midi files.
.PP
.IP \fB\+\fP
Turns the master volume up.
.PP
.IP \fB\-\fP
Turns the master volume down.
.PP
.IP \fBe\fP
Turns enhanced resampling on and off.
.PP
.IP \fBl\fP
Turns volume curves on and off.
.PP
.IP \fBr\fP
Turns the final mix reverb on and off.
.PP
.IP \fBn\fP
Play the next midi on the command line.
.PP
.IP \fBp\fP
Pause the playback. Note: since the audio is buffered it will stop when the audio buffer is empty.
.PP
.IP \fB.\fP
Seek forward 1 second. Note: Clears active midi events and will only play midi events from after the new position.
.PP
.IP \fB,\fP
Seek backwards 1 second. Note: Clears active midi events and will only play midi events from after the new position.
.PP
.IP \fBq\fP
Quit wildmidi.
.PP
.SH SEE ALSO
.BR WildMidi_GetString (3) ,
.BR WildMidi_Init (3) ,
.BR WildMidi_MasterVolume (3) ,
.BR WildMidi_Open (3) ,
.BR WildMidi_OpenBuffer (3) ,
.BR WildMidi_SetOption (3) ,
.BR WildMidi_GetOutput (3) ,
.BR WildMidi_GetInfo (3) ,
.BR WildMidi_FastSeek (3) ,
.BR WildMidi_Close (3) ,
.BR WildMidi_Shutdown (3) ,
.BR wildmidi.cfg (5)
.PP
.SH AUTHOR
Chris Ison <wildcode@users.sourceforge.net>
Bret Curtis <psi29a@gmail.com>
.PP
.SH COPYRIGHT
Copyright (C) Chris Ison 20012010
Copyright (C) Bret Curtis 20132014
.PP
This file is part of WildMIDI.
.PP
WildMIDI is free software: you can redistribute and/or modify the player under the terms of the GNU General Public License and you can redistribute and/or modify the library under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the licenses, or(at your option) any later version.
.PP
WildMIDI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License and the GNU Lesser General Public License for more details.
.PP
You should have received a copy of the GNU General Public License and the GNU Lesser General Public License along with WildMIDI. If not, see <http://www.gnu.org/licenses/>.
.PP
.PP
This manpage is licensed under the Creative Commons AttributionShare Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
.PP
.TH WildMidi_Close 3 "05 June 2010" "" "WildMidi Programmer's Manual"
.SH NAME
WildMidi_Close \- Close an open midi handle
.SH LIBRARY
.B libWildMidi
.SH SYNOPSIS
.B #include <wildmidi_lib.h>
.PP
.B int WildMidi_Close (midi *\fIhandle\fB)
.PP
.SH DESCRIPTION
Finish processing MIDI data or file.
.PP
.IP \fIhandle\fP
The identifier obtained from opening a midi file with \fBWildMidi_Open\fR(3)\fP or \fBWildMidi_OpenBuffer\fR(3)\fP
.PP
.SH "RETURN VALUE"
returns \-1 on error, otherwise returns 0
.PP
.SH SEE ALSO
.BR WildMidi_GetString (3) ,
.BR WildMidi_Init (3) ,
.BR WildMidi_MasterVolume (3) ,
.BR WildMidi_Open (3) ,
.BR WildMidi_OpenBuffer (3) ,
.BR WildMidi_SetOption (3) ,
.BR WildMidi_GetOutput (3) ,
.BR WildMidi_GetInfo (3) ,
.BR WildMidi_FastSeek (3) ,
.BR WildMidi_Shutdown (3) ,
.BR wildmidi (1) ,
.BR wildmidi.cfg (5)
.PP
.SH AUTHOR
Chris Ison <wildcode@users.sourceforge.net>
Bret Curtis <psi29a@gmail.com>
.SH COPYRIGHT
Copyright (C) Chris Ison 2001\-2010
Copyright (C) Bret Curtis 2013\-2014
.PP
This file is part of WildMIDI.
.PP
WildMIDI is free software: you can redistribute and/or modify the player under the terms of the GNU General Public License and you can redistribute and/or modify the library under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the licenses, or(at your option) any later version.
.PP
WildMIDI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License and the GNU Lesser General Public License for more details.
.PP
You should have received a copy of the GNU General Public License and the GNU Lesser General Public License along with WildMIDI. If not, see <http://www.gnu.org/licenses/>.
.PP
.PP
This manpage is licensed under the Creative Commons Attribution\-Share Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
.PP
.TH WildMidi_FastSeek 3 "05 June 2010" "" "WildMidi Programmer's Manual"
.SH NAME
WildMidi_FastSeek \- Move to a position in a midi file
.PP
.SH LIBRARY
.B libWildMidi
.PP
.SH SYNOPSIS
.B #include <wildmidi_lib.h>
.PP
.B int WildMidi_FastSeek (midi *\fIhandle\fB, unsigned short int *\fIsample_pos\fB);
.PP
.SH DESCRIPTION
Resets all note specific midi states and active notes before scanning to \fIsample_pos\fP samples from the beginning taking note of any changes to midi channel states. The next call to \fIWildMidi_GetOutput\fP\fR(3)\fP will behave as if you started to play the midi from that position.
.PP
.IP \fIhandle\fP
The identifier obtained from opening a midi file with \fBWildMidi_Open\fR(3)\fP or \fBWildMidi_OpenBuffer\fR(3)\fP
.PP
.IP \fIsample_pos\fI
The number of samples from the beginning you want libWildMidi to seek to.
.PP
NOTE: significant delay can occur when using this function. You can expect even more delay if you select a position that's already been passed forcing the library to start from the beginning.
.PP
.SH SEE ALSO
.BR WildMidi_GetString (3) ,
.BR WildMidi_Init (3) ,
.BR WildMidi_MasterVolume (3) ,
.BR WildMidi_Open (3) ,
.BR WildMidi_OpenBuffer (3) ,
.BR WildMidi_SetOption (3) ,
.BR WildMidi_GetOutput (3) ,
.BR WildMidi_GetInfo (3) ,
.BR WildMidi_Close (3) ,
.BR WildMidi_Shutdown (3) ,
.BR wildmidi (1) ,
.BR wildmidi.cfg (5)
.PP
.SH AUTHOR
Chris Ison <wildcode@users.sourceforge.net>
Bret Curtis <psi29a@gmail.com>
.PP
.SH COPYRIGHT
Copyright (C) Chris Ison 2001\-2010
Copyright (C) Bret Curtis 2013\-2014
.PP
This file is part of WildMIDI.
.PP
WildMIDI is free software: you can redistribute and/or modify the player under the terms of the GNU General Public License and you can redistribute and/or modify the library under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the licenses, or(at your option) any later version.
.PP
WildMIDI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; w