Commit 64f44897 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

bump portmidi to rev 217 from 2010

parent 17df62cd
<?xml version="1.0" encoding = "Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="ALL_BUILD"
ProjectGUID="{E1C2664B-91BB-4D4F-868C-433164F81101}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="ALL_BUILD.dir\Debug"
ConfigurationType="10"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".\pm_common;.\porttime;"
ExceptionHandling="0"
PreprocessorDefinitions="CMAKE_INTDIR=\&quot;Debug\&quot;"
AssemblerListingLocation="Debug"
ObjectFile="$(IntDir)\"
/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories=".\pm_common;.\porttime;"
PreprocessorDefinitions="CMAKE_INTDIR=\&quot;Debug\&quot;"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="CMAKE_INTDIR=\&quot;Debug\&quot;"
MkTypLibCompatible="FALSE"
TargetEnvironment="1"
GenerateStublessProxies="TRUE"
TypeLibraryName="$(InputName).tlb"
OutputDirectory="$(IntDir)"
HeaderFileName="$(InputName).h"
DLLDataFileName=""
InterfaceIdentifierFileName="$(InputName)_i.c"
ProxyFileName="$(InputName)_p.c"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCPostBuildEventTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="ALL_BUILD.dir\Release"
ConfigurationType="10"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".\pm_common;.\porttime;"
ExceptionHandling="0"
PreprocessorDefinitions="CMAKE_INTDIR=\&quot;Release\&quot;"
AssemblerListingLocation="Release"
ObjectFile="$(IntDir)\"
/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories=".\pm_common;.\porttime;"
PreprocessorDefinitions="CMAKE_INTDIR=\&quot;Release\&quot;"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="CMAKE_INTDIR=\&quot;Release\&quot;"
MkTypLibCompatible="FALSE"
TargetEnvironment="1"
GenerateStublessProxies="TRUE"
TypeLibraryName="$(InputName).tlb"
OutputDirectory="$(IntDir)"
HeaderFileName="$(InputName).h"
DLLDataFileName=""
InterfaceIdentifierFileName="$(InputName)_i.c"
ProxyFileName="$(InputName)_p.c"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCPostBuildEventTool"/>
</Configuration>
</Configurations>
<Files>
<File
RelativePath=".\CMakeFiles\ALL_BUILD">
</File>
<Filter
Name="CMake Rules"
Filter="">
<File
RelativePath=".\CMakeFiles\ALL_BUILD.rule">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Build all projects"
CommandLine=""
AdditionalDependencies=".\CMakeFiles\ALL_BUILD.rule"
Outputs=".\CMakeFiles\ALL_BUILD"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Build all projects"
CommandLine=""
AdditionalDependencies=".\CMakeFiles\ALL_BUILD.rule"
Outputs=".\CMakeFiles\ALL_BUILD"/>
</FileConfiguration>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
/* CHANGELOG FOR PORTMIDI
*
* 19Oct09 Roger Dannenberg
* - Changes dynamic library names from portmidi_d to portmidi to
* be backward-compatible with programs expecting a library by
* the old name.
*
* 04Oct09 Roger Dannenberg
* - Converted to using Cmake.
* - Renamed static and dynamic library files to portmidi_s and portmidi_d
* - Eliminated VC9 and VC8 files (went back to simply test.vcproj, etc.,
* use Cmake to switch from the provided VC9 files to VC8 or other)
* - Many small changes to prepare for 64-bit architectures (but only
* tested on 32-bit machines)
*
* 16Jun09 Roger Dannenberg
* - Started using Microsoft Visual C++ Version 9 (Express). Converted
* all *-VC9.vcproj file to *.vcproj and renamed old project files to
* *-VC8.proj. Previously, output from VC9 went to special VC9 files,
* that breaks any program or script looking for output in release or
* debug files, so now both compiler version output to the same folders.
* Now, debug version uses static linking with debug DLL runtime, and
* release version uses static linking with statically linked runtime.
* Converted to Inno Setup and worked on scripts to make things build
* properly, especially pmdefaults.
*
* 02Jan09 Roger Dannenberg
* - Created Java interface and wrote PmDefaults application to set
* values for Pm_GetDefaultInputDeviceID() and
* Pm_GetDefaultOutputDeviceID(). Other fixes.
*
* 19Jun08 Roger Dannenberg and Austin Sung
* - Removed USE_DLL_FOR_CLEANUP -- Windows 2000 through Vista seem to be
* fixed now, and can recover if MIDI ports are left open
* - Various other minor patches
*
* 17Jan07 Roger Dannenberg
* - Lots more help for Common Lisp user in pm_cl
......
# portmidi
# Roger B. Dannenberg
# 20 Sep 2009
cmake_minimum_required(VERSION 2.6)
if(UNIX)
# allow user to set Release or Debug
set(CMAKE_BUILD_TYPE Release CACHE STRING
"Semicolon-separate list of supported configuration types")
# set default directories but don't override cached values...
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE}
CACHE STRING "libraries go here")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE}
CACHE STRING "libraries go here")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE}
CACHE STRING "executables go here")
else(UNIX)
# this does not seem to work for xcode:
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING
"Semicolon-separate list of supported configuration types")
endif(UNIX)
#set(CMAKE_RELATIVE_PATHS ON CACHE STRING "avoid absolute paths" FORCE)
# Clear out the built-in C++ compiler and link flags for each of the
# unused configurations.
set(CMAKE_CXX_FLAGS_MINSIZEREL "" CACHE INTERNAL "Unused")
set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "" CACHE INTERNAL "Unused")
set(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "" CACHE INTERNAL "Unused")
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "" CACHE INTERNAL "Unused")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "" CACHE INTERNAL "Unused")
set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "" CACHE INTERNAL "Unused")
set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "" CACHE INTERNAL "Unused")
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "" CACHE INTERNAL "Unused")
set(CMAKE_OSX_ARCHITECTURES i386 ppc x86_64 CACHE STRING "change to needed architecture for a smaller library" FORCE)
PROJECT(portmidi)
if(UNIX)
# Problem: if there was an old Debug build and you change
# CMAKE_BUILD_TYPE to Release, then the OUTPUT_DIRECTORY's will
# still be Debug. Try to fix this by checking if the DIRECTORY's
# look wrong, and if so, force them to the defaults:
if(CMAKE_BUILD_TYPE MATCHES "Debug")
set(BAD_DIR "Release")
else(CMAKE_BUILD_TYPE MATCHES "Debug")
set(BAD_DIR "Debug")
endif(CMAKE_BUILD_TYPE MATCHES "Debug")
# use library as reference -- if you give it a non-BAD_DIR location
# then every other path is left alone
if(CMAKE_LIBRARY_OUTPUT_DIRECTORY MATCHES ${BAD_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE}
CACHE STRING "executables go here" FORCE)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY
${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE}
CACHE STRING "libraries go here" FORCE)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${CMAKE_CACHEFILE_DIR}/${CMAKE_BUILD_TYPE}
CACHE STRING "libraries go here" FORCE)
endif(CMAKE_LIBRARY_OUTPUT_DIRECTORY MATCHES ${BAD_DIR})
endif(UNIX)
include_directories(pm_common porttime)
add_subdirectory(pm_common)
add_subdirectory(pm_test)
add_subdirectory(pm_dylib)
# Cannot figure out how to make an xcode Java application with CMake
add_subdirectory(pm_java)
This diff is collapsed.
README for PortMidi
Roger Dannenberg
VERSION: this is the 17-Jan-07 version of PortMidi.
Roger B. Dannenberg
VERSION: please use "svn info" to get info.
Documentation for PortMidi is found in pm_common/portmidi.h.
......@@ -10,6 +11,10 @@ Additional documentation:
- Linux: see pm_linux/README_LINUX.txt
- Mac OSX: see pm_mac/README_MAC.txt
- Common Lisp: see pm_cl/README_CL.txt
- Eclipse: see portmidi_cdt.zip (this was contributed as is; the dlls here
are now -- Sep 09 -- out of date. What is really needed is a script
to generate this release automatically so we can maintain it.)
- C-Sharp: see pm_csharp.zip (also contributed as is)
---------- some notes on the design of PortMidi ----------
......@@ -27,7 +32,7 @@ ERROR HANDLING
Error handling turned out to be much more complicated than expected.
PortMidi functions return error codes that the caller can check.
In addition, errors may occur asynchronously due to MIDI input.
In addition, errors may occur asynchronously due to MIDI input.
However, for Windows, there are virtually no errors that can
occur if the code is correct and not passing bogus values. One
exception is an error that the system is out of memory, but my
......@@ -39,8 +44,8 @@ Ordinarily, the caller checks for an error code. If the error is
system-dependent, pmHostError is returned and the caller can
call Pm_GetHostErrorText to get a text description of the error.
Host error codes are system-specific and are recorded in the
system-specific data allocated for each open MIDI port.
Host error codes are system-specific and are recorded in the
system-specific data allocated for each open MIDI port.
However, if an error occurs on open or close,
we cannot store the error with the device because there will be
no device data (assuming PortMidi cleans up after devices that
......@@ -56,7 +61,7 @@ overhead even if the user does not want to look at the error data.
The system-specific Read, Write, Poll, etc. implementations should
check for asynchronous errors and return immediately if one is
found so that these get reported. This happens in the Mac OS X
found so that these get reported. This happens in the Mac OS X
code, where lots of things are happening in callbacks, but again,
in Windows, there are no error codes recorded in callbacks.
......@@ -64,7 +69,7 @@ DEBUGGING
If you are building a console application for research, we suggest
compiling with the option PM_CHECK_ERRORS. This will insert a
check for error return values at the end of each PortMidi
check for error return values at the end of each PortMidi
function. If an error is encountered, a text message is printed
using printf(), the user is asked to type ENTER, and then exit(-1)
is called to clean up and terminate the program.
......
<?xml version="1.0" encoding = "Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="ZERO_CHECK"
ProjectGUID="{28779535-7541-4FF5-AC12-FAFD66E894EC}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="ZERO_CHECK.dir\Debug"
ConfigurationType="10"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".\pm_common;.\porttime;"
ExceptionHandling="0"
PreprocessorDefinitions="CMAKE_INTDIR=\&quot;Debug\&quot;"
AssemblerListingLocation="Debug"
ObjectFile="$(IntDir)\"
/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories=".\pm_common;.\porttime;"
PreprocessorDefinitions="CMAKE_INTDIR=\&quot;Debug\&quot;"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="CMAKE_INTDIR=\&quot;Debug\&quot;"
MkTypLibCompatible="FALSE"
TargetEnvironment="1"
GenerateStublessProxies="TRUE"
TypeLibraryName="$(InputName).tlb"
OutputDirectory="$(IntDir)"
HeaderFileName="$(InputName).h"
DLLDataFileName=""
InterfaceIdentifierFileName="$(InputName)_i.c"
ProxyFileName="$(InputName)_p.c"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCPostBuildEventTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="ZERO_CHECK.dir\Release"
ConfigurationType="10"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".\pm_common;.\porttime;"
ExceptionHandling="0"
PreprocessorDefinitions="CMAKE_INTDIR=\&quot;Release\&quot;"
AssemblerListingLocation="Release"
ObjectFile="$(IntDir)\"
/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories=".\pm_common;.\porttime;"
PreprocessorDefinitions="CMAKE_INTDIR=\&quot;Release\&quot;"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="CMAKE_INTDIR=\&quot;Release\&quot;"
MkTypLibCompatible="FALSE"
TargetEnvironment="1"
GenerateStublessProxies="TRUE"
TypeLibraryName="$(InputName).tlb"
OutputDirectory="$(IntDir)"
HeaderFileName="$(InputName).h"
DLLDataFileName=""
InterfaceIdentifierFileName="$(InputName)_i.c"
ProxyFileName="$(InputName)_p.c"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCPostBuildEventTool"/>
</Configuration>
</Configurations>
<Files>
<File
RelativePath=".\CMakeFiles\ZERO_CHECK">
</File>
<Filter
Name="CMake Rules"
Filter="">
<File
RelativePath=".\CMakeFiles\ZERO_CHECK.rule">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description=""
CommandLine=""
AdditionalDependencies=".\CMakeFiles\ZERO_CHECK.rule"
Outputs=".\CMakeFiles\ZERO_CHECK"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCustomBuildTool"
Description=""
CommandLine=""
AdditionalDependencies=".\CMakeFiles\ZERO_CHECK.rule"
Outputs=".\CMakeFiles\ZERO_CHECK"/>
</FileConfiguration>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
......@@ -3,10 +3,10 @@
*
* license.txt -- a copy of the PortMidi copyright notice and license information
*
* Latest version available at: http://www.cs.cmu.edu/~music/portmidi/
* Latest version available at: http://sourceforge.net/projects/portmedia
*
* Copyright (c) 1999-2000 Ross Bencina and Phil Burk
* Copyright (c) 2001-2006 Roger B. Dannenberg
* Copyright (c) 2001-2009 Roger B. Dannenberg
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
......
README_CL.txt for PortMidi
Roger B. Dannenberg
17 Jan 2007
This is a Common Lisp interface to PortMidi.
On Mac OSX, you need to build PortMidi as a dynamic link library
before you can use PortMidi from Common Lisp.
You can build PortMidi as a dynamic link library by running this:
cd portmidi
make -F pm_mac/Makefile.osx install-with-xcode
This is just a shortcut for:
cd portmidi/pm_mac
sudo xcodebuild -project pm_mac.xcodeproj -configuration Deployment install DSTROOT=/
You can check the file and the architecture for which it is built using:
file /usr/local/lib/libportmidi.dylib
If you've done this install of portmidi, then you should also have
/usr/local/include/portmidi.h
This will be necessary to successfully build the cffi interface below.
To test PortMidi with Common Lisp, I (RBD) am using SBCL, which I
downloaded from http://prdownloads.sourceforge.net/sbcl. Currently, I use
sbcl-0.9.17-x86-darwin-binary.tar.bz2
To install this, I unpacked it by just double-clicking in the finder. Then,
from a command window, I became root using "sudo sh", and then typed:
# INSTALL_ROOT=/usr/local
# sh install.sh
# exit
I also downloaded cffi-061012.tar.gz from
http://common-lisp.net/project/cffi/tarballs/?M=D
To compile cffi, use the following, where "/Lisp/cffi/" is replaced by
the actual directory of cffi, e.g.
"/Users/rbd/sbcl-0.9.17-x86-darwin/cffi-061012":
% sbcl
* (require 'asdf)
* (push "/Lisp/cffi/" asdf:*central-registry*)
* (asdf:oos 'asdf:load-op :cffi)
* (quit)
Download Common Music's portmidi module from cvs and build the c side:
(Replace "/Lisp" with your lisp directory, e.g.
"/Users/rbd/sbcl-0.9.17-x86-darwin". These cvs commands will create
a new directory, portmidi.)
% cd /Lisp
% export CVSROOT=:pserver:anonymous@commonmusic.cvs.sourceforge.net:/cvsroot/commonmusic
% cvs login # press Return at password prompt
% cvs checkout portmidi
% cd portmidi
% ./configure
% make
% cd ..
Now compile/load the portmidi module just like cffi. Again, change
"/Lisp/cffi/" and "/Lisp/portmidi" to correspond to your local file system.
(Note that /Lisp becomes your lisp directory, and "cffi" becomes your
cffi folder name, e.g. "cffi-061012".
% sbcl
* (require 'asdf)
* (push "/Lisp/cffi/" asdf:*central-registry*)
* (asdf:oos 'asdf:load-op :cffi)
* (push "/Lisp/portmidi/" asdf:*central-registry*)
* (asdf:oos 'asdf:load-op :portmidi)
Look in the file /Lisp/portmidi/test.lisp for a test of the lisp interface to
portmidi. For example, while still running sbcl:
* (pm:portmidi) ; initialize portmidi
* (pt:start) ; start time
* (pt:time) ; get time
* (pprint (pm:GetDeviceInfo)) ; get list of devices
((:ID 0 :NAME "IAC Driver Bus 1" :TYPE :INPUT :OPEN NIL)
(:ID 1 :NAME "IAC Driver Bus 1" :TYPE :OUTPUT :OPEN NIL))
Notice that test.lisp assumes MIDI input devices are connected
and uses some hard-wired device numbers, so it may not run
as is without error.
Since test.lisp uses some Common Music calls, I (RBD) wrote a
simpler test, test-no-cm.lisp, which is in the same folder as
this (README_CL.txt) file. To use it, first check that the
values for outid (4) and inid (1) actually match PortMidi device
id's for output and input devices, and make sure the input
device is a keyboard that can generate a middle-C -- otherwise
the program will hang waiting for input. Run sbcl from this
pm_cl folder, and type:
(load "test-no-cm.lisp")
The program pauses frequently by calling (READ), so you
should type t or something, then <RETURN> to continue.
(Thanks to Leigh Smith and Rick Taube)
;;; **********************************************************************
;;; Copyright (C) 2005 Heinrich Taube, <taube (at) uiuc (dot) edu>
;;;
;;; This program is free software; you can redistribute it and/or
;;; modify it under the terms of the Lisp Lesser Gnu Public License.
;;; See http://www.cliki.net/LLGPL for the text of this agreement.
;;; **********************************************************************
;;; A CFFI interface to Portmidi. Should run in most Common Lisp
;;; implementations on Linux, OS X and Windows. For information about
;;; CFFI see http://common-lisp.net/project/cffi/
(in-package :cl-user)
(defvar *libportmidi*
(let ((type #+(or darwin macos macosx) "dylib"
#+(or linux linux-target (and unix pc386) freebsd) "so"
#+(or win32 microsoft-32 cygwin) "dll")
(paths (list "/usr/lib/" "/usr/local/lib/" *load-pathname*)))
(loop for d in paths
for p = (make-pathname :name "libportmidi" :type type
:defaults d)
when (probe-file p) do (return p)
finally
(error "Library \"portmidi.~A\" not found. Fix *libportmidi*."
type))))
;;; linux: guess i need to load porttime.so first (?) osx doesnt seem
;;; to need this lib at all...
#+(or linux (and clisp unix (not macos)))
(let ((lpt (merge-pathnames "libporttime" *libportmidi*)))
(if (probe-file lpt)
(cffi:load-foreign-library lpt)
(error "Porttime: ~a not found. Fix *libportmidi* path." lpt)))
;;; load portmidi lib
(cffi:load-foreign-library *libportmidi*)
(defpackage :portmidi
(:use :common-lisp)
(:nicknames :pm :pt)
(:shadow :initialize :terminate :time :start :stop :abort
:close :read :write :poll)
(:export :Initialize :Terminate
:HasHostError :GetErrorText :GetHostErrorText
:CountDevices :GetDefaultInputDeviceID
:GetDefaultOutputDeviceID :GetDeviceInfo
:Message :Message.status :Message.data1 :Message.data2
:Event.message :Event.timestamp
;; event buffers added to api
:EventBufferNew :EventBufferFree :EventBufferElt
:EventBufferMap
:OpenInput :OpenOutput :SetFilter :SetChannelMask
:Abort :Close :Read :Write :Poll :WriteShort :WriteSysex
;; filtering constants
:filt-active :filt-sysex :filt-clock :filt-play :filt-f9
:filt-fd :filt-reset :filt-note :filt-channel-aftertouch
:filt-poly-aftertouch :filt-program :filt-control
:filt-pitchbend :filt-mtc :filt-song-position
:filt-song-select :filt-tune :filt-tick :filt-undefined
:filt-realtime :filt-aftertouch :filt-systemcommon
;; porttime.
:Start :Stop :Started :Time
;; initialization insurers added to api
:portmidi :*portmidi* ))
(in-package :portmidi)
(cffi:defcstruct pm-device-info
(struct-version :int)
(interf :pointer)
(name :pointer)
(input :int)
(output :int)
(opened :int))