diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2026-02-02 21:06:17 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2026-02-02 21:06:17 +0900 |
| commit | e117a8a6cf51174e41374659f3ab9246c1ab7455 (patch) | |
| tree | 24d9e3ab6f90f1aa6bdf6ca499b5ec9d4927cc48 | |
| parent | 6c3a434cef1efd230acf15eb81e17aa057084123 (diff) | |
| download | arts-master.tar.gz arts-master.zip | |
Remove support for Irix, which is discontinued and does not provide a c++17 complaint compilerHEADmaster
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
| -rw-r--r-- | flow/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | flow/audioiosgi.cpp | 274 | ||||
| -rw-r--r-- | flow/gsl/gslopmaster.c | 2 | ||||
| -rw-r--r-- | mcopidl/yacc.cpp | 2 |
4 files changed, 3 insertions, 277 deletions
diff --git a/flow/CMakeLists.txt b/flow/CMakeLists.txt index 5f211a3..87c5799 100644 --- a/flow/CMakeLists.txt +++ b/flow/CMakeLists.txt @@ -60,7 +60,7 @@ set( ${target}_SRCS audioionull.cpp audioiolibaudioio.cpp audioioesd.cpp audioiosndio.cpp audioiojack.cpp audioiosun.cpp audioioaix.cpp audioionas.cpp cpuinfo.cpp audioioossthreaded.cpp audiotobytestream_impl.cpp - audioiosgi.cpp audioiocsl.cpp audioiomas.cpp datahandle_impl.cpp + audioiocsl.cpp audioiomas.cpp datahandle_impl.cpp ) tde_add_library( ${target} SHARED diff --git a/flow/audioiosgi.cpp b/flow/audioiosgi.cpp deleted file mode 100644 index 72e1782..0000000 --- a/flow/audioiosgi.cpp +++ /dev/null @@ -1,274 +0,0 @@ - /* - - Copyright (C) 2001 Carsten Kroll - ckroll@pinnaclesys.com - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -/** - * only compile 'sgi' AudioIO class if compiled under IRIX - */ -#ifdef HAVE_IRIX - -#include <dmedia/audio.h> -#include <sys/types.h> -#include <sys/ioctl.h> -#include <sys/time.h> -#include <sys/stat.h> - -#ifdef HAVE_SYS_SELECT_H -#include <sys/select.h> // Needed on some systems. -#endif - -#include <assert.h> -#include <errno.h> -#include <fcntl.h> -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <iostream> -#include <algorithm> - -#include "debug.h" -#include "audioio.h" - -namespace Arts { - -class AudioIOSGI : public AudioIO { -protected: - int requestedFragmentSize; - int requestedFragmentCount; - ALport audio_port,audio_port1; - ALconfig audioconfig; - int framesz; - -public: - AudioIOSGI(); - - void setParam(AudioParam param, int& value); - int getParam(AudioParam param); - - bool open(); - void close(); - int read(void *buffer, int size); - int write(void *buffer, int size); -}; - - -REGISTER_AUDIO_IO(AudioIOSGI,"sgi","SGI dmedia Audio I/O"); -}; - -using namespace std; -using namespace Arts; - -AudioIOSGI::AudioIOSGI() -{ - /* - * default parameters - */ - param(samplingRate) = 44100; - paramStr(deviceName) = "audioio"; - requestedFragmentSize = param(fragmentSize) = 4096; - requestedFragmentCount = param(fragmentCount) = 10; - audio_port=0; - audio_port1=0; - param(format)=17; - param(channels) = 2; - param(direction) = 2; -} - -bool AudioIOSGI::open() -{ - string& _error = paramStr(lastError); - string& _deviceName = paramStr(deviceName); - int& _channels = param(channels); - int& _fragmentSize = param(fragmentSize); - int& _fragmentCount = param(fragmentCount); - int& _samplingRate = param(samplingRate); - int& _format = param(format); - int& _direction = param(direction); - int err; - - if(_direction != 3 && _direction != 2){ - _error = "invalid direction"; - return false; - } - framesz=((_format & ~1) >> 3) * _channels; - - audioconfig = alNewConfig(); - alSetSampFmt(audioconfig,AL_SAMPFMT_TWOSCOMP); - - alSetWidth(audioconfig, _format==8 ? AL_SAMPLE_8 : _format==16 || _format==17 ? AL_SAMPLE_16 : AL_SAMPLE_24); - alSetQueueSize(audioconfig,(requestedFragmentSize * requestedFragmentCount) / framesz); - alSetChannels(audioconfig,_channels); - - audio_port = alOpenPort("out","w",audioconfig); - - - if (audio_port == (ALport) 0 ) { - err = oserror(); - if (err == AL_BAD_NO_PORTS) { - _error = "System is out of audio ports"; - } else if (err == AL_BAD_DEVICE_ACCESS) { - _error = "Couldn't access audio device"; - } else if (err == AL_BAD_OUT_OF_MEM) { - _error = "Out of memory"; - } - close(); - return false; - } - if (_direction == 3){ - audio_port1 = alOpenPort("in","r",audioconfig); - if (audio_port1 == (ALport) 0 ) { - err = oserror(); - if (err == AL_BAD_NO_PORTS) { - _error = "System is out of audio ports"; - } else if (err == AL_BAD_DEVICE_ACCESS) { - _error = "Couldn't access audio device"; - } else if (err == AL_BAD_OUT_OF_MEM) { - _error = "Out of memory"; - } - close(); - return false; - } - } - /* - * Attempt to set a crystal-based sample-rate on the - * given device. - */ - ALpv x[2]; - x[0].param = AL_MASTER_CLOCK; - x[0].value.i = AL_CRYSTAL_MCLK_TYPE; - x[1].param = AL_RATE; - x[1].value.ll = alDoubleToFixed(double(_samplingRate)); - if (alSetParams(alGetResource(audio_port),x, 2)<0) { - _error="setparams failed: "; - _error+=alGetErrorString(oserror()); - close(); - return false; - } - if (_direction == 3) - if (alSetParams(alGetResource(audio_port1),x, 2)<0) { - _error="setparams failed: "; - _error+=alGetErrorString(oserror()); - close(); - return false; - } - if (x[1].sizeOut < 0) { - _error="rate was invalid"; - close(); - return false; - } - - alSetFillPoint(audio_port,(alGetQueueSize(audioconfig)*5)/10) ;//50 % - if (_direction == 3) - alSetFillPoint(audio_port1,(alGetQueueSize(audioconfig)*4)/10) ;//40 % - /* - * set the fragment settings to what the user requested - */ - - _fragmentSize = requestedFragmentSize; - _fragmentCount = requestedFragmentCount; - - - artsdebug("buffering: %d fragments with %d bytes " - "(audio latency is %1.1f ms)", _fragmentCount, _fragmentSize, - (float)(_fragmentSize*_fragmentCount) / - (float)(2.0 * _samplingRate * _channels)*1000.0); - - - return true; -} - -void AudioIOSGI::close() -{ - alFreeConfig(audioconfig); - alClosePort(audio_port); - audio_port=0; - if (param(direction) == 3) { - alClosePort(audio_port1); - audio_port1=0; - } -} - -void AudioIOSGI::setParam(AudioParam p, int& value) -{ - switch(p) - { - case fragmentSize: - param(p) = requestedFragmentSize = value; - break; - case fragmentCount: - param(p) = requestedFragmentCount = value; - break; - default: - param(p) = value; - break; - } -} - -int AudioIOSGI::getParam(AudioParam p) -{ - int frames; - switch(p) - { - case canRead: - frames=alGetFilled(audio_port); - return frames*framesz; - break; - - case canWrite: - frames=alGetFillable(audio_port); - return frames*framesz; - break; - - case selectReadFD: - return (param(direction) & directionRead)? - alGetFD(audio_port1):-1; - break; - - case selectWriteFD: - return (param(direction) & directionWrite)? - alGetFD(audio_port):-1; - break; - - default: - return param(p); - break; - } -} - -int AudioIOSGI::read(void *buffer, int size) -{ - arts_assert(audio_port1 != 0); - ::alReadFrames(audio_port1,buffer,size/framesz); - return size; -} - -int AudioIOSGI::write(void *buffer, int size) -{ - arts_assert(audio_port != 0); - ::alWriteFrames(audio_port,buffer,size/framesz); - return size; -} - -#endif diff --git a/flow/gsl/gslopmaster.c b/flow/gsl/gslopmaster.c index fe198ac..ee7f782 100644 --- a/flow/gsl/gslopmaster.c +++ b/flow/gsl/gslopmaster.c @@ -641,7 +641,7 @@ _engine_master_prepare (GslEngineLoop *loop) g_return_val_if_fail (loop != NULL, FALSE); - /* setup and clear pollfds here already, so master_poll_check() gets no junk (and IRIX can't handle non-0 revents) */ + /* setup and clear pollfds here already, so master_poll_check() gets no junk */ loop->fds_changed = master_pollfds_changed; master_pollfds_changed = FALSE; loop->n_fds = master_n_pollfds; diff --git a/mcopidl/yacc.cpp b/mcopidl/yacc.cpp index e261b5a..6b94d18 100644 --- a/mcopidl/yacc.cpp +++ b/mcopidl/yacc.cpp @@ -373,7 +373,7 @@ static const short yycheck[] = { 0, #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #else /* not GNU C. */ -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) +#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || (defined (__sun) && defined (__i386)) #define YYSTACK_USE_ALLOCA #include <alloca.h> #else /* not sparc */ |
