diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-05 21:11:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-05 21:11:05 +0000 |
commit | 6637c742279c9df570b3bd1d09244f1b0f66ee62 (patch) | |
tree | 522e3430dc3b085aad27f9eb6f144977b65a1dd3 /soundserver | |
parent | 7de042bb5beca4107a444f8c60ef24c9735deb65 (diff) | |
download | arts-6637c742279c9df570b3bd1d09244f1b0f66ee62.tar.gz arts-6637c742279c9df570b3bd1d09244f1b0f66ee62.zip |
Compilation repairs
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/arts@1212131 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'soundserver')
-rw-r--r-- | soundserver/artsd.cc | 7 | ||||
-rw-r--r-- | soundserver/artsplay.cc | 18 |
2 files changed, 16 insertions, 9 deletions
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) |