No sound in game at all- Ubuntu Oneiric [solved]

Ask for help regarding any technical issue or report any bug or OS independent issues.
Post Reply
User avatar
Derpella
Novice
Novice
Posts: 198
Joined: 14 Jun 2011, 08:08
Location: Poland

No sound in game at all- Ubuntu Oneiric [solved]

Post by Derpella »

From a some time I don't have sound at all both in official client and manaplus. Both music and SFX.
Volume is set OK. Every other app's sound is working.
Other SDL applications have sound working well.
The problem could have started
a) after upgrading Ubuntu to 11.10
b) after compiling manually all libraries to compile some custom mana client. Debian-based systems are putting files in other places than different distros, so I had to compile SDL, guichan, everything. (Compilation wasn't finished successfully because of "fatal error: SDL_ttf.h: No such file or directory" even if I compiled SDL_ttf...)
These two events happened in similar time, so I don't know what could had caused the problem. Any ideas?
Last edited by Derpella on 18 Nov 2011, 13:55, edited 2 times in total.
I'm Image too much.
4144
Knight
Knight
Posts: 965
Joined: 03 Aug 2009, 11:57

Re: No sound in game at all- Ubuntu Oneiric

Post by 4144 »

I not sure is it possible in 11.10, but try disable pulse audio.
User avatar
Derpella
Novice
Novice
Posts: 198
Joined: 14 Jun 2011, 08:08
Location: Poland

Re: No sound in game at all- Ubuntu Oneiric

Post by Derpella »

I would have to remove it completely... I'll ask friend if it's safe and worth it.
I'm Image too much.
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: No sound in game at all- Ubuntu Oneiric

Post by o11c »

You shouldn't've had to recompile any system libraries in order to build a client; in fact it is very easy to mess things up that way ... did you do: apt-get build-dep mana ?

As far as I can tell, the dependencies of the mana client are not affected by Debian's multiarch support; that only affects system packages.
Former programmer for the TMWA server.
User avatar
Derpella
Novice
Novice
Posts: 198
Joined: 14 Jun 2011, 08:08
Location: Poland

Re: No sound in game at all- Ubuntu Oneiric

Post by Derpella »

Wow! That "apt-get build-dep mana" did many things and I almost achieved compiling this alternative client, but suddenly "emoteshortcut.cpp:29:1: error: ‘EmoteShortcut::EmoteShortcut’ names the constructor, not the type", which ended my journey to explore the unknown. (I will remember the command, useful one).
Sound still doesn't work though.
I'm Image too much.
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: No sound in game at all- Ubuntu Oneiric

Post by o11c »

Huh? That error should only occur if you are using the ancient TMW package ... or more likely manabot, in which case we will not help you.
Former programmer for the TMWA server.
User avatar
Derpella
Novice
Novice
Posts: 198
Joined: 14 Jun 2011, 08:08
Location: Poland

Re: No sound in game at all- Ubuntu Oneiric

Post by Derpella »

If there were some stats, I think I would win as a slowest levelling character :D And I wouldn't bot, because there are too few players and too many posts in Court ;) I believe everyone who bots would be sooner or later caught, and it's just not worth it. I just had some fun and not-evil ideas I wanted to test, and there are gm test servers that I could safely use for this purpose. Despite of my motives, asking a dev to help compiling a botting program would be somehow rude, I only admitted it because I was afraid messing with libraries could broke my sound.
BTW, yes, sound still doesn't work :(
I'm Image too much.
User avatar
i
TMW Adviser
TMW Adviser
Posts: 1114
Joined: 07 Mar 2005, 17:29
Location: Poland
Contact:

Re: No sound in game at all- Ubuntu Oneiric

Post by i »

Derpella wrote:I believe everyone who bots would be sooner or later caught,
Nope. I got a bot with decent "AI" chatting module.
Croovka block diagram.png
Croovka block diagram.png (98.54 KiB) Viewed 3348 times
Shaney.py - Markov Chain Library

Code: Select all

import sys
import random
import string

def run(filename=''):
	file = open( filename, 'r')
	
	text = file.read()
	file.close()
	words = string.split(text)
	
	end_sentence = []
	dict = {}
	prev1 = ''
	prev2 = ''
	for word in words:
	  if prev1 != '' and prev2 != '':
	    key = (prev2, prev1)
	    if dict.has_key(key):
	      dict[key].append(word)
	    else:
	      dict[key] = [word]
	      if prev1[-1:] == '.':
	        end_sentence.append(key)
	  prev2 = prev1
	  prev1 = word
	
	if end_sentence == []:
	  answers = ['Sorry, but I don\'t know anything about it!',
	  	     'Are you talking to me?',
		     'Why should I answer?',
		     'Oh, that\'s sad...',
	  	     'Well, I don\'t think I know anything about it']
	  
	  print random.choice(answers)
	  return
	
	key = ()
	count = 2
	
	while 1:
	  if dict.has_key(key):
	    word = random.choice(dict[key])
	    print word,
	    key = (key[1], word)
	    if key in end_sentence:
	      print
	      count = count - 1
	      if count <= 0:
		break
	  else:
	    key = random.choice(end_sentence)
	
if __name__ == '__main__':
	run(sys.argv[1])
Getpage.sh - based on Lfamtuff's google chat bot (Kate)

Code: Select all

#!/bin/sh

# run marvelous text browser LYNX in special dump mode
# dump output to temp-file
/usr/bin/lynx \
	-cfg=/dev/null \
	-dump \
	-accept_all_cookies \
	-anonymous \
	-assume_charset=utf-8 \
	-assume_unrec_charset=utf-8 \
	-connect_timeout=5 \
	-cookie_file=lynx_cookies \
	-cookie_save_file=lynx_cookies \
	-display_charset=utf-8 \
	-force_html \
	-nobrowse \
	-nolist \
	-nostatus \
   	-ftp \
	-telnet \
	-rlogin \
	-tagsoup \
	-width=10000 \
	-nomargins \
	-nonumbers\
    "$1" > temp-file

# Step .: Expand common problematic abbreviations
# Step 1: Remove all leading and trailing spaces.
# Step 2: Convert invalid punctuation by adding a space.
# Step 3: Remove extra leading spaces on some punctuation.
# Step 4: Remove extra trailing spaces on some punctuation.
# Step 5: Split lines at end of sentences.
# Step 6: Remove [] text, compact spaces, compact pauses.
# Step 7: Select only sentences resembling legal text.
# Step 8: Elliminate broken brackets.
# Step 9: Homogenize quotes.
# Step A: Remove broken quotes.
# Step B: Remove Google search phrases and code fragments.
# Step C: Remove dates.
# Step D: Remove repeated dots.

cat temp-file | \
  sed -e 's/\([dD]\)r. /\1octor /g;s/\([Pp]\)rof. /\1rofessor /g;s/\([Aa]\)pprox. /\1pproximately /g;s/est. /established /g' | \
  sed -e 's/^[ ]*//g;s/[ ]*$//g' | \
  sed -e 's/\([^A-Z]\)\([.!?:,;)]\)\([A-Z]\)/\1\2 \3/g' | \
  sed -e 's/[ ]*\([.!?:,;)]\)/\1/g' | \
  sed -e 's/([ ]*/)/g' | \
  sed -e 's/\([.!?]\) /\1\
/g' | \
  sed -e 's/\[[^[]*\]//g;s/[ ][ ]*/ /g;s/-[-]*/-/g' | \
  grep -I '^[A-Z].* .*[a-z][a-z][a-z].*[.!?]$' | \
  grep -vE '\([^)]*$|^[^(]*\)' | \
  sed -e 's/``/"/g;s/'"''"'/"/g;s/,,/"/g' | \
  grep -vE '"[^"]*$|^[^"]*"' | \
  sed 's/</{/g;s/>/}/g' | \
  sed -e 's/\([^A-Z]\)\([.!?:,;)][.!?:,;)]*\)\([A-Za-z]\)/\1\2 \3/g' | \
  grep -vE ':.*:|}.*}|{.*{' | \
  grep -viE '^Subject[^a-z]|^Re:|^From:|^To:|^Fwd:|^Temat:|^Wpis:' | \
  grep -viE '2011 Google' | \
  grep -viE 'Search within results ' | \
  grep -vie 'Groups View all web results' | \
  grep -vie 'nav_[a-z]*gif' | \
  grep -vE '([A-Z][a-z]{2} [0-9]{1,2} [0-9]{1,4})|([A-Z][a-z]{2} by)' | \
  grep -vE '([0-9]{1,2}/){2,3}' | \
  grep -vE '[.]{3}@[a-z]*' | \
  grep -ve '[A-Z][a-z]{2} [0-9]{1,2}, [0-9]{1,4}' | \
  sed -e 's/\.\././g' | \
  sed -e 's/\.\././g' | \
  sort -u > output-file

# remove temporary file
rm -f temp-file
# execute Mark V Shaney with sentences database
python shaney.py output-file 
# remove temporary file
rm -f output-file
I will not present full game client code. If someone understand this code surely don't need the bot because that person is most likely dev team member. I did this module a long time ago, I needed it on my studies.
User avatar
Derpella
Novice
Novice
Posts: 198
Joined: 14 Jun 2011, 08:08
Location: Poland

Re: No sound in game at all- Ubuntu Oneiric

Post by Derpella »

I am very happy for you , but I don't think it's necessary. I think a loud noise or automatic disconnect/stop when green nick types would be enough.
And I would take seriously the smart saying, that you can't find the difference between a read stupid person and someone pretending to be stupid. Pretending a being a more normal internet guy using a robot is hard and never perfect, unless you build a database like cleverbot. Taking sentences from google... If gm asks "Hello" on the botcheck and you will start writing sophisticated sentences, it will be pretty obvious to find out after few tries.
And if you'll make a bot "hi", "ur a gm" "me not speak english" "wat" "sell florest bow 15k ok?" it will be undistinguishable from many players, easier to code, elegant and no one would even think about asking you anything else.
The sane answer to "How are you?" can be only "ok thx wbu?" If someone would answer "Serious question. So you're enjoying your viewing" I would only wait for him to add CHEAP FEMALE HANDBAGS DOLCE AND GABBANA<www.virus.es> PROZAC VIAGRA<http://wesnortedatflourandselltosukce.rs>
Ekhm, and by the way... SOUND STILL DON'T WORK. I WOULD LIKE FOR IT TO WORK.

Edit:
Yay :) Yes, it was compiling libraries manually which broke the sound. I went to the directory with SDL_mixer source code (the one I was compiling from) and made make uninstall.
The music is so sweet...
And the sound of Tulim music and noobs killing squeaking maggots made me cry with happiness and nostalgy.
I'm Image too much.
Post Reply