From 6637c742279c9df570b3bd1d09244f1b0f66ee62 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 5 Jan 2011 21:11:05 +0000 Subject: Compilation repairs git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/arts@1212131 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- soundserver/artsd.cc | 7 ++++--- soundserver/artsplay.cc | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 9 deletions(-) (limited to 'soundserver') diff --git a/soundserver/artsd.cc b/soundserver/artsd.cc index 6b6a22e..cbe5525 100644 --- a/soundserver/artsd.cc +++ b/soundserver/artsd.cc @@ -296,9 +296,10 @@ int main(int argc, char **argv) if(cfgForceStart && !AudioSubSystem::the()->check()) { - warnNullDevice = "Error while initializing the sound driver:\n"; - warnNullDevice += AudioSubSystem::the()->error(); - warnNullDevice += "\n\nThe sound server will continue, using the null output device."; + //Don't show an error (this looks bad and may confuse users without sound cards), kmix makes it obvious if sound isn't working + //warnNullDevice = "Error while initializing the sound driver:\n"; + //warnNullDevice += AudioSubSystem::the()->error(); + //warnNullDevice += "\n\nThe sound server will continue, using the null output device."; AudioSubSystem::the()->audioIO("null"); } diff --git a/soundserver/artsplay.cc b/soundserver/artsplay.cc index b8dec3d..a694cd3 100644 --- a/soundserver/artsplay.cc +++ b/soundserver/artsplay.cc @@ -42,13 +42,19 @@ static string absolutePath(const string& path) { if(path[0] == '/') return path; - char buffer[PATH_MAX]; - getcwd(buffer,PATH_MAX); + int size = 4096; - if(buffer[strlen(buffer)-1] == '/') - return buffer + path; - else - return string(buffer) + '/' + path; + while (1) { + char buffer[size]; + if (getcwd(buffer,size)) + { + if(buffer[strlen(buffer)-1] == '/') + return buffer + path; + else + return string(buffer) + '/' + path; + } + size *= 2; + } } int main(int argc, char **argv) -- cgit v1.2.1