mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
Re-create comms/linpsk
Simple Qt PSK31, RTTY, and MSK31 client
This commit is contained in:
parent
6003cb70d9
commit
ad758556d7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=376648
1
MOVED
1
MOVED
@ -4456,7 +4456,6 @@ comms/kallers||2013-07-26|Has expired: Depends on Qt 3.x
|
||||
comms/kmobiletools||2013-07-26|Has expired: Depends on Qt 3.x
|
||||
comms/kpsk||2013-07-26|Has expired: Depends on Qt 3.x
|
||||
comms/ktrack||2013-07-26|Has expired: Depends on Qt 3.x
|
||||
comms/linpsk||2013-07-26|Has expired: Depends on Qt 3.x
|
||||
converters/ktextdecode||2013-07-26|Has expired: Depends on Qt 3.x
|
||||
databases/kmysqladmin||2013-07-26|Has expired: Depends on Qt 3.x
|
||||
databases/knoda||2013-07-26|Has expired: Depends on Qt 3.x
|
||||
|
@ -85,6 +85,7 @@
|
||||
SUBDIR += libticables2
|
||||
SUBDIR += libticalcs2
|
||||
SUBDIR += libusbmuxd
|
||||
SUBDIR += linpsk
|
||||
SUBDIR += linrad
|
||||
SUBDIR += lirc
|
||||
SUBDIR += locator
|
||||
|
33
comms/linpsk/Makefile
Normal file
33
comms/linpsk/Makefile
Normal file
@ -0,0 +1,33 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= linpsk
|
||||
PORTVERSION= 1.2
|
||||
CATEGORIES= comms hamradio
|
||||
MASTER_SITES= SF
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
|
||||
|
||||
MAINTAINER= hamradio@freebsd.org
|
||||
COMMENT= Simple Qt PSK31, RTTY, and MSK31 client
|
||||
|
||||
LIB_DEPENDS= libfftw3.so:${PORTSDIR}/math/fftw3 \
|
||||
libasound.so:${PORTSDIR}/audio/alsa-lib
|
||||
|
||||
USES= qmake tar:tgz
|
||||
USE_QT4= gui network corelib moc_build uic_build rcc_build qmake_build
|
||||
DESKTOP_ENTRIES="LinPsk" "${COMMENT}" \
|
||||
"${DATADIR}/linpsk.png" "linpsk" "Audio;HamRadio;" \
|
||||
false
|
||||
|
||||
PLIST_FILES= bin/linpsk \
|
||||
%%DATADIR%%/linpsk.png
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's|<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>|<!-- & -->|g' \
|
||||
${WRKSRC}/gui/*.ui
|
||||
|
||||
post-install:
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/images/linpsk.png ${STAGEDIR}${DATADIR}
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/linpsk
|
||||
|
||||
.include <bsd.port.mk>
|
2
comms/linpsk/distinfo
Normal file
2
comms/linpsk/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (linpsk-1.2.tgz) = be02a5dcb2168ad60d1e450fe77346a9aa8480669fe11e209fc94f26835aaec8
|
||||
SIZE (linpsk-1.2.tgz) = 126171
|
80
comms/linpsk/files/patch-src_csound.cpp
Normal file
80
comms/linpsk/files/patch-src_csound.cpp
Normal file
@ -0,0 +1,80 @@
|
||||
--- src/csound.cpp.orig 2013-12-24 23:45:41.000000000 -0800
|
||||
+++ src/csound.cpp 2015-01-09 11:00:21.000000000 -0800
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
using namespace std;
|
||||
extern Parameter settings;
|
||||
-CSound::CSound ( int ptt = -1 ) : Input ( ptt )
|
||||
+CSound::CSound ( int ptt ) : Input ( ptt )
|
||||
{
|
||||
started = false;
|
||||
output = false;
|
||||
@@ -41,7 +41,13 @@
|
||||
return 0;
|
||||
if ( anzahl > available )
|
||||
return 0;
|
||||
- memcpy ( sample, &buffer[readPointer], anzahl*sizeof ( double ) ) ;
|
||||
+ for (int i=0; i<anzahl; i++) {
|
||||
+ sample[i] = (double)buffer[readPointer+i] / 0x7fffffff;
|
||||
+ if (sample[i] < -1.0)
|
||||
+ sample[i] = -1.0;
|
||||
+ else if(sample[i] > 1.0)
|
||||
+ sample[i] = 1.0;
|
||||
+ }
|
||||
LockPointers.lock();
|
||||
available -= anzahl;
|
||||
free += anzahl;
|
||||
@@ -101,10 +107,10 @@
|
||||
return false;
|
||||
}
|
||||
/* Set the sample format */
|
||||
- err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_FLOAT_LE );
|
||||
+ err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_S32 );
|
||||
if ( err < 0 )
|
||||
{
|
||||
- *errorstring = QString ( "Sample format Float not available : " ) + QString ( snd_strerror ( err ) );
|
||||
+ *errorstring = QString ( "Sample format Signed 32-bit not available : " ) + QString ( snd_strerror ( err ) );
|
||||
return false;
|
||||
}
|
||||
/* Set the count of channels, most soundcards only support stereo */
|
||||
@@ -229,10 +235,10 @@
|
||||
return false;
|
||||
}
|
||||
/* Set the sample format */
|
||||
- err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_FLOAT_LE );
|
||||
+ err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_S32 );
|
||||
if ( err < 0 )
|
||||
{
|
||||
- *errorstring = QString ( "Sample format Float not available : " ) + QString ( snd_strerror ( err ) );
|
||||
+ *errorstring = QString ( "Sample format Signed 32-bit not available : " ) + QString ( snd_strerror ( err ) );
|
||||
return false;
|
||||
}
|
||||
/* Set the count of channels */
|
||||
@@ -305,7 +311,8 @@
|
||||
{
|
||||
if ( anzahl <= free )
|
||||
{
|
||||
- memcpy ( &buffer[freePointer], sample, anzahl*sizeof ( double ) );
|
||||
+ for (int i=0; i<anzahl; i++)
|
||||
+ buffer[freePointer+i] = sample[i] * 0x7fffffff;
|
||||
LockPointers.lock();
|
||||
toBePlayed += anzahl;
|
||||
free -= anzahl;
|
||||
@@ -394,7 +401,7 @@
|
||||
void CSound::record()
|
||||
{
|
||||
int toBeRead, err;
|
||||
- float SampleBuffer[256];
|
||||
+ int32_t SampleBuffer[256];
|
||||
qDebug ( "Start recording" );
|
||||
while ( started )
|
||||
{
|
||||
@@ -447,7 +454,7 @@
|
||||
|
||||
void CSound::play()
|
||||
{
|
||||
- float SampleBuffer[256], x;
|
||||
+ int32_t SampleBuffer[256], x;
|
||||
bool signaled;
|
||||
int err, laenge;
|
||||
laenge = 128;
|
19
comms/linpsk/files/patch-src_csound.h
Normal file
19
comms/linpsk/files/patch-src_csound.h
Normal file
@ -0,0 +1,19 @@
|
||||
--- src/csound.h.orig 2013-12-24 23:45:41.000000000 -0800
|
||||
+++ src/csound.h 2015-01-07 07:38:09.000000000 -0800
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <inttypes.h>
|
||||
|
||||
#include <QMutex>
|
||||
#include <QWaitCondition>
|
||||
@@ -49,7 +50,7 @@
|
||||
private: // Private attributes
|
||||
snd_pcm_t *handle;
|
||||
bool output;
|
||||
- double buffer[2*BUF_SIZE]; // 16 bit , stereo
|
||||
+ int32_t buffer[2*BUF_SIZE]; // 16 bit , stereo
|
||||
QMutex LockPointers;
|
||||
QWaitCondition WakeUp;
|
||||
void record();
|
11
comms/linpsk/files/patch-src_textinput.cpp
Normal file
11
comms/linpsk/files/patch-src_textinput.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/textinput.cpp.orig 2015-01-07 06:35:27.000000000 -0800
|
||||
+++ src/textinput.cpp 2015-01-07 06:35:36.000000000 -0800
|
||||
@@ -22,7 +22,7 @@
|
||||
extern Parameter settings;
|
||||
extern int errno;
|
||||
|
||||
-TextInput::TextInput ( int ptt = -1 ) : Input ( ptt )
|
||||
+TextInput::TextInput ( int ptt ) : Input ( ptt )
|
||||
{
|
||||
}
|
||||
TextInput::~TextInput()
|
11
comms/linpsk/files/patch-src_waveinput.cpp
Normal file
11
comms/linpsk/files/patch-src_waveinput.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/waveinput.cpp.orig 2015-01-07 06:36:15.000000000 -0800
|
||||
+++ src/waveinput.cpp 2015-01-07 06:36:25.000000000 -0800
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
extern Parameter settings;
|
||||
|
||||
-WaveInput::WaveInput(int ptt = -1): Input(ptt)
|
||||
+WaveInput::WaveInput(int ptt): Input(ptt)
|
||||
{
|
||||
EightBits=false;
|
||||
}
|
16
comms/linpsk/pkg-descr
Normal file
16
comms/linpsk/pkg-descr
Normal file
@ -0,0 +1,16 @@
|
||||
LinPsk is a program for operating on digital modes running on Linux.
|
||||
|
||||
LinPsk supports BPSK , QPSK and RTTY at the moment.
|
||||
|
||||
Main features are:
|
||||
|
||||
the simultaneuos decoding of up to four channels.
|
||||
The different digital modes may be mixed
|
||||
You can define a trigger on each channel to be notified if a text of your choice is detected.
|
||||
You can log each received channel at a file.
|
||||
For easy qso'ing you can define macros and for larger texts to be send you can use two files.
|
||||
You can view the signal as spectrum or in a waterfall display. Both are scalable in the frequency domain.
|
||||
|
||||
At the Moment RTTY only supports 45 baud and 1.5 stopbits.
|
||||
|
||||
WWW: http://linpsk.sourceforge.net/
|
Loading…
Reference in New Issue
Block a user