Merge pull request #6 from dg0tm/master

compiler fixes
pull/8/head
Jonathan Naylor 8 years ago committed by GitHub
commit 2bafb2f67c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

1
.gitignore vendored

@ -8,3 +8,4 @@ Release
*.bak
.vs
*.a
*.d

@ -19,7 +19,7 @@
class IAudioCallback {
public:
virtual void readCallback(const wxFloat32* input, unsigned int nSamples, int id) = 0;
virtual void writeCallback(wxFloat32* output, unsigned int& nSamples, int id) = 0;
virtual void writeCallback(wxFloat32* output, int& nSamples, int id) = 0;
private:
};

@ -591,7 +591,7 @@ void CSoundCardController::readCallback(const wxFloat32* input, unsigned int n,
#endif
}
void CSoundCardController::writeCallback(wxFloat32* output, unsigned int& n, int id)
void CSoundCardController::writeCallback(wxFloat32* output, int& n, int id)
{
if (n == 0U)
return;

@ -52,7 +52,7 @@ public:
virtual bool writeData(const unsigned char* data, unsigned int length, bool end);
virtual void readCallback(const wxFloat32* input, unsigned int n, int id);
virtual void writeCallback(wxFloat32* output, unsigned int& n, int id);
virtual void writeCallback(wxFloat32* output, int& n, int id);
private:
CSoundCardReaderWriter m_sound;

@ -730,25 +730,25 @@ void* CSoundCardWriter::Entry()
wxLogMessage(wxT("Starting ALSA writer thread"));
while (!m_killed) {
unsigned int nSamples = 2U * m_blockSize;
int nSamples = 2U * m_blockSize;
m_callback->writeCallback(m_buffer, nSamples, m_id);
if (nSamples == 0U) {
Sleep(5UL);
} else {
if (m_channels == 1U) {
for (unsigned int n = 0U; n < nSamples; n++)
for (int n = 0U; n < nSamples; n++)
m_samples[n] = short(m_buffer[n] * 32767.0F);
} else {
unsigned int i = 0U;
for (unsigned int n = 0U; n < nSamples; n++) {
int i = 0U;
for (int n = 0U; n < nSamples; n++) {
short sample = short(m_buffer[n] * 32767.0F);
m_samples[i++] = sample;
m_samples[i++] = sample; // Same value to both channels
}
}
unsigned int offset = 0U;
int offset = 0U;
snd_pcm_sframes_t ret;
while ((ret = ::snd_pcm_writei(m_handle, m_samples + offset, nSamples - offset)) != (nSamples - offset)) {
if (ret < 0) {
@ -759,7 +759,7 @@ void* CSoundCardWriter::Entry()
::snd_pcm_recover(m_handle, ret, 1);
} else {
offset += (unsigned int)ret;
offset += ret;
}
}
}

@ -503,14 +503,16 @@ void CDStarRepeaterApp::createThread()
wxLogInfo("Split, local: %s:%u, timeout: %u ms", localAddress.c_str(), localPort, timeout);
for (unsigned int i = 0U; i < transmitterNames.GetCount(); i++) {
wxString name = transmitterNames.Item(i);
if (!name.IsEmpty())
if (!name.IsEmpty()) {
wxLogInfo("\tTX %u name: %s", i + 1U, name.c_str());
}
}
for (unsigned int i = 0U; i < receiverNames.GetCount(); i++) {
wxString name = receiverNames.Item(i);
if (!name.IsEmpty())
if (!name.IsEmpty()) {
wxLogInfo("\tRX %u name: %s", i + 1U, name.c_str());
}
}
modem = new CSplitController(localAddress, localPort, transmitterNames, receiverNames, timeout);
} else if (modemType.IsSameAs("Icom Access Point/Terminal Mode")) {
wxString port;

@ -5,7 +5,7 @@ export BINDIR := "/usr/bin"
export CXX := $(shell wx-config --cxx)
export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)'
export GUILIBS := $(shell wx-config --libs adv,core,base) -lasound -lusb-1.0
export GUILIBS := $(shell wx-config --libs adv,core,base) -lasound
export LIBS := $(shell wx-config --libs base) -lasound -lusb-1.0
export LDFLAGS :=
@ -39,4 +39,3 @@ clean:
.PHONY: force
force:
@true

@ -23,7 +23,7 @@ GUICommon/GUICommon.a: force
Common/Common.a: force
$(MAKE) -C Common
.PHONY:
.PHONY: install
install: all
$(MAKE) -C Data install
$(MAKE) -C DStarRepeater install

Loading…
Cancel
Save

Powered by TurnKey Linux.