2001: A Space Odyssey",
//-----------------------------------------------------
"C",
"S",
72,
"/gensounds/2001_space_odyssey/afraid.wav",
"2001: A Space Odyssey",
//-----------------------------------------------------
"C",
"S",
103,
"/gensounds/2001_space_odyssey/airlock.wav",
"2001: A Space Odyssey",
//-----------------------------------------------------
"C",
"S",
47,
"/gensounds/2001_space_odyssey/cantdo.wav",
"2001: A Space Odyssey",
//-----------------------------------------------------
"C",
"S",
67,
"/gensounds/2001_space_odyssey/cropped.wav",
"2001: A Space Odyssey",
//-----------------------------------------------------
"C",
"S",
762,
"/gensounds/2001_space_odyssey/monolith2001.wav",
"2001: A Space Odyssey",
//-----------------------------------------------------
"C",
"S",
121,
"/gensounds/2001_space_odyssey/stress2001.wav",
"2001: A Space Odyssey",
//-----------------------------------------------------
"C",
"N",
338,
"/gensounds/analyze_this/barnes.wav",
"Analyze This!",
//-----------------------------------------------------
"G",
"N",
287,
"/gensounds/analyze_this/deadnote.wav",
"Analyze This!",
//-----------------------------------------------------
"C",
"N",
106,
"/gensounds/analyze_this/fishing.wav",
"Analyze This!",
//-----------------------------------------------------
"G",
"N",
387,
"/gensounds/analyze_this/getalife.wav",
"Analyze This!",
//-----------------------------------------------------
"C",
"N",
119,
"/gensounds/analyze_this/hearno.wav",
"Analyze This!",
//-----------------------------------------------------
"C",
"N",
127,
"/gensounds/analyze_this/nodoctor.wav",
"Analyze This!",
//-----------------------------------------------------
"C",
"N",
161,
"/gensounds/analyze_this/scotch.wav",
"Analyze This!",
//-----------------------------------------------------
"C",
"N",
246,
"/gensounds/analyze_this/restrain.wav",
"Analyze This!",
//-----------------------------------------------------
"C",
"N",
118,
"/gensounds/analyze_this/video.wav",
"Analyze This!",
//-----------------------------------------------------
"C",
"N",
75,
"/gensounds/as_good_as_it_gets/bettrman.wav",
"As Good As It Gets",
//-----------------------------------------------------
"C",
"N",
130,
"/gensounds/as_good_as_it_gets/boyfriend.wav",
"As Good As It Gets",
//-----------------------------------------------------
"C",
"N",
120,
"/gensounds/as_good_as_it_gets/stories.wav",
"As Good As It Gets",
//-----------------------------------------------------
"C",
"G",
128,
"/gensounds/austin_powers/angry.wav",
"The Austin Powers series of films",
//-----------------------------------------------------
"C",
"G",
38,
"/gensounds/austin_powers/beat_drevil.wav",
"The Austin Powers series of films",
//-----------------------------------------------------
"C",
"G",
23,
"/gensounds/austin_powers/bigglesworth.wav",
"The Austin Powers series of films",
//-----------------------------------------------------
"C",
"G",
56,
"/gensounds/austin_powers/failure.wav",
"The Austin Powers series of films",
//-----------------------------------------------------
"C",
"G",
31,
"/gensounds/austin_powers/get_ap.wav",
"The Austin Powers series of films",
//-----------------------------------------------------
"C",
"G",
27,
"/gensounds/austin_powers/grr_baby.wav",
"The Austin Powers series of films",
//-----------------------------------------------------
"C",
"G",
49,
"/gensounds/austin_powers/lair.wav",
"The Austin Powers series of films",
//-----------------------------------------------------
"C",
"G",
92,
"/gensounds/austin_powers/mrevil.wav",
"The Austin Powers series of films",
//-----------------------------------------------------
"C",
"G",
43,
"/gensounds/austin_powers/swingerr.wav",
"The Austin Powers series of films",
//-----------------------------------------------------
"C",
"G",
56,
"/gensounds/austin_powers/trillions.wav",
"The Austin Powers series of films",
//-----------------------------------------------------
"C",
"G",
38,
"/gensounds/austin_powers/ugly_stick.wav",
"The Austin Powers series of films",
//-----------------------------------------------------
"C",
"G",
20,
"/gensounds/austin_powers/yeahbaby.wav",
"The Austin Powers series of films",
//-----------------------------------------------------
"C",
"G",
149,
"/gensounds/austin_powers/zipit.wav",
"The Austin Powers series of films",
//-----------------------------------------------------
"C",
"H",
87,
"/gensounds/aviation_accidents/dl191_short.wav",
"The last moments of Delta Air Lines Flight 191 (black box recording); " .
"which crashed due to wind shear on August 2, 1985 in Dallas, Texas; " .
"killing 136 people in the aircraft and one on the ground",
//-----------------------------------------------------
"C",
"G",
93,
"/gensounds/blues_brothers/106miles.wav",
"The Blues Brothers",
//-----------------------------------------------------
"C",
"G",
104,
"/gensounds/carlin_pa/500islands.wav",
"George Carlin, Parental Advisory",
//-----------------------------------------------------
"C",
"G",
117,
"/gensounds/carlin_pa/dad_drink_more.wav",
"George Carlin, Parental Advisory",
//-----------------------------------------------------
"C",
"G",
88,
"/gensounds/carlin_pa/grand_canyon_yoyo.wav",
"George Carlin, Parental Advisory",
//-----------------------------------------------------
"C",
"G",
94,
"/gensounds/carlin_pa/leave_me_alone.wav",
"George Carlin, Parental Advisory",
//-----------------------------------------------------
"C",
"G",
79,
"/gensounds/carlin_pa/rape_is_funny.wav",
"George Carlin, Parental Advisory",
//-----------------------------------------------------
"C",
"G",
187,
"/gensounds/carlin_pa/rr_tracks.wav",
"George Carlin, Parental Advisory",
//-----------------------------------------------------
"C",
"G",
88,
"/gensounds/carlin_pa/stupid_half.wav",
"George Carlin, Parental Advisory",
//-----------------------------------------------------
"C",
"N",
79,
"/gensounds/godfather/blood.wav",
"The Godfather",
//-----------------------------------------------------
"C",
"N",
77,
"/gensounds/godfather/fishes.wav",
"The Godfather",
//-----------------------------------------------------
"C",
"N",
194,
"/gensounds/godfather/goomba.wav",
"The Godfather",
//-----------------------------------------------------
"C",
"N",
25,
"/gensounds/godfather/offer.wav",
"The Godfather",
//-----------------------------------------------------
"C",
"N",
489,
"/gensounds/godfather/peace.wav",
"The Godfather",
//-----------------------------------------------------
"C",
"N",
148,
"/gensounds/godfather/someday.wav",
"The Godfather",
//-----------------------------------------------------
"C",
"N",
361,
"/gensounds/godfather/sonny.wav",
"The Godfather (from the famous scene where Sonny [James Caan] is gunned down at the tollbooth)",
//-----------------------------------------------------
"C",
"E",
294,
"/gensounds/humorous/thenack.wav",
"Unknown",
//-----------------------------------------------------
"C",
"N",
38,
"/gensounds/movie_top_gun/ego.wav",
"Top Gun",
//-----------------------------------------------------
"C",
"N",
333,
"/gensounds/pulp_fiction/bible_passage.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
136,
"/gensounds/pulp_fiction/big_brain_brett_long.wav",
"Pulp Fiction",
//-----------------------------------------------------
"C",
"N",
7,
"/gensounds/pulp_fiction/big_brain_brett_short.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
119,
"/gensounds/pulp_fiction/bowl_of_rice.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
26,
"/gensounds/pulp_fiction/chill_them_out.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
294,
"/gensounds/pulp_fiction/dn_storage.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
6,
"/gensounds/pulp_fiction/english_short.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
325,
"/gensounds/pulp_fiction/europe_little_differences.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
7,
"/gensounds/pulp_fiction/fatman.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
196,
"/gensounds/pulp_fiction/fonzie_is_cool.wav",
"Pulp Fiction",
//-----------------------------------------------------
"C",
"N",
20,
"/gensounds/pulp_fiction/gimp.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
86,
"/gensounds/pulp_fiction/guy_foot_massage.wav",
"Pulp Fiction",
//-----------------------------------------------------
"C",
"N",
43,
"/gensounds/pulp_fiction/hamburger.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
142,
"/gensounds/pulp_fiction/jules_quitting.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
271,
"/gensounds/pulp_fiction/marvin_shot.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
338,
"/gensounds/pulp_fiction/medieval_long.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
289,
"/gensounds/pulp_fiction/mushroom_cloud_long.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
15,
"/gensounds/pulp_fiction/mushroom_cloud_short.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
154,
"/gensounds/pulp_fiction/piercing.wav",
"Pulp Fiction",
//-----------------------------------------------------
"C",
"N",
302,
"/gensounds/pulp_fiction/pigs_filthy_animals.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
146,
"/gensounds/pulp_fiction/please_clean_car.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
71,
"/gensounds/pulp_fiction/postpone_congratulation_long.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
30,
"/gensounds/pulp_fiction/postpone_congratulation_short.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
24,
"/gensounds/pulp_fiction/rapist.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
20,
"/gensounds/pulp_fiction/sending_the_wolf.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
134,
"/gensounds/pulp_fiction/take_the_money.wav",
"Pulp Fiction",
//-----------------------------------------------------
"D",
"N",
94,
"/gensounds/pulp_fiction/towel_dirty.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
2,
"/gensounds/pulp_fiction/use_toilet.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
318,
"/gensounds/pulp_fiction/wallace_appearance.wav",
"Pulp Fiction",
//-----------------------------------------------------
"C",
"N",
84,
"/gensounds/pulp_fiction/we_happy.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
205,
"/gensounds/pulp_fiction/weirdest_day.wav",
"Pulp Fiction",
//-----------------------------------------------------
"G",
"N",
347,
"/gensounds/pulp_fiction/wristwatch_history.wav",
"Pulp Fiction",
//-----------------------------------------------------
"C",
"N",
14,
"/gensounds/pulp_fiction/zed_is_dead.wav",
"Pulp Fiction",
//-----------------------------------------------------
"C",
"N",
38,
"/gensounds/r_lee_ermey/dirtbag.wav",
"R. Lee Ermey, Full Metal Jacket",
//-----------------------------------------------------
"C",
"N",
117,
"/gensounds/r_lee_ermey/ermey_1234corp.wav",
"Full Metal Jacket",
//-----------------------------------------------------
"C",
"N",
28,
"/gensounds/r_lee_ermey/ermey_charge.wav",
"R. Lee Ermey, Full Metal Jacket",
//-----------------------------------------------------
"C",
"N",
26,
"/gensounds/r_lee_ermey/ermey_equally.wav",
"R. Lee Ermey, Full Metal Jacket",
//-----------------------------------------------------
"C",
"N",
12,
"/gensounds/r_lee_ermey/ermey_goodnite.wav",
"R. Lee Ermey, Full Metal Jacket",
//-----------------------------------------------------
"C",
"N",
159,
"/gensounds/r_lee_ermey/ermey_kisser.wav",
"R. Lee Ermey, from his web site.",
//-----------------------------------------------------
"C",
"N",
99,
"/gensounds/star_trek_orig/blow.wav",
"Star Trek",
//-----------------------------------------------------
"C",
"N",
43,
"/gensounds/star_trek_orig/explain.wav",
"Star Trek",
//-----------------------------------------------------
"C",
"N",
27,
"/gensounds/star_trek_orig/guardian.wav",
"Star Trek",
//-----------------------------------------------------
"C",
"N",
96,
"/gensounds/star_trek_mp/vger.wav",
"Star Trek: The Motion Picture",
//-----------------------------------------------------
"C",
"N",
35,
"/gensounds/star_trek_vh/amiracle.wav",
"Star Trek IV: The Voyage Home",
//-----------------------------------------------------
"C",
"N",
118,
"/gensounds/star_trek_vh/avoidearth.wav",
"Star Trek IV: The Voyage Home",
//-----------------------------------------------------
"C",
"N",
127,
"/gensounds/star_trek_vh/backpost.wav",
"Star Trek IV: The Voyage Home",
//-----------------------------------------------------
"C",
"N",
218,
"/gensounds/star_trek_vh/colorful.wav",
"Star Trek IV: The Voyage Home",
//-----------------------------------------------------
"C",
"N",
34,
"/gensounds/star_trek_vi_tuc/1strule.wav",
"Star Trek VI: The Undiscovered Country",
//-----------------------------------------------------
"C",
"N",
184,
"/gensounds/star_trek_vi_tuc/breathing.wav",
"Star Trek VI: The Undiscovered Country",
//-----------------------------------------------------
"C",
"N",
72,
"/gensounds/star_trek_vi_tuc/didntfire.wav",
"Star Trek VI: The Undiscovered Country",
//-----------------------------------------------------
"C",
"N",
92,
"/gensounds/star_trek_vi_tuc/knees.wav",
"Star Trek VI: The Undiscovered Country",
//-----------------------------------------------------
"C",
"N",
46,
"/gensounds/star_trek_vi_tuc/nixon.wav",
"Star Trek VI: The Undiscovered Country",
//-----------------------------------------------------
"C",
"N",
50,
"/gensounds/star_trek_vi_tuc/request.wav",
"Star Trek VI: The Undiscovered Country",
//-----------------------------------------------------
"C",
"N",
75,
"/gensounds/star_trek_vi_tuc/savedciv.wav",
"Star Trek VI: The Undiscovered Country",
//-----------------------------------------------------
"C",
"N",
26,
"/gensounds/star_trek_vi_tuc/screwup.wav",
"Star Trek VI: The Undiscovered Country",
//-----------------------------------------------------
"C",
"N",
55,
"/gensounds/star_trek_vi_tuc/shutup.wav",
"Star Trek VI: The Undiscovered Country",
//-----------------------------------------------------
"C",
"N",
108,
"/gensounds/star_trek_orig/shatner.wav",
"William Shatner, during a satirical skit involving speaking at a " .
"Star Trek convention, from an unknown episode of Saturday Night Live",
//-----------------------------------------------------
"C",
"N",
137,
"/gensounds/star_trek_ng/locutus0.wav",
"Patrick Stewart, Star Trek: The Next Generation",
//-----------------------------------------------------
"C",
"N",
73,
"/gensounds/star_wars/beaten.wav",
"The Star Wars series of films",
//-----------------------------------------------------
"C",
"N",
35,
"/gensounds/terminator/back.wav",
"Arnold Schwarzenegger, the Terminator series of films",
//-----------------------------------------------------
"C",
"N",
35,
"/gensounds/terminator/cyborg.wav",
"Michael Biehn, the Terminator series of films",
//-----------------------------------------------------
"C",
"N",
3,
"/gensounds/terminator/get_out.wav",
"Arnold Schwarzenegger, the Terminator series of films",
//-----------------------------------------------------
"C",
"N",
73,
"/gensounds/terminator/yourclot.wav",
"Arnold Schwarzenegger, the Terminator series of films",
);
//Copy the elements that match into a parallel array that will be returned.
$c = count($sounds);
if ($c % 5)
{
//Not a multiple of 5, something is wrong with the array.
$dbsounds_total = 0;
return(false);
}
$dbsounds_total = $c/5;
for ($i = 0; $i < $c; $i += 5)
{
$excluded = 0;
if ($cleanliness != "A")
{
if (!BGSOUND_string_intersection($cleanliness, $sounds[$i]))
{
$excluded = 1;
}
}
if ($topic != "A")
{
if (!BGSOUND_string_intersection($topic, $sounds[$i+1]))
{
$excluded = 1;
}
}
if (($maxsize != 0) && ($maxsize < $sounds[$i+2]))
{
$excluded = 1;
}
if ($minsize > $sounds[$i+2])
{
$excluded = 1;
}
if (!$excluded)
{
if (!isset($rv))
{
$rv = array($i/5);
}
else
{
array_push($rv, $i/5);
}
array_push($rv, $sounds[$i]);
array_push($rv, $sounds[$i+1]);
array_push($rv, $sounds[$i+2]);
array_push($rv, $sounds[$i+3]);
array_push($rv, $sounds[$i+4]);
}
} //End for()
if (isset($rv))
return($rv);
else
return(false);
}
//
//Returns a random sound subject to the parameters. If a sound matching the criteria can't be found,
//the $soundpath and the $soundcredit are set to be the empty string. The total number of sounds in the database,
//the number selected per the query, and the effective array index of the sound selected are returned.
//
function BGSOUND_bgsound_random(
$cleanliness,
$topic,
$minsize,
$maxsize,
&$soundpath,
&$soundcredit,
&$dbsounds_total,
&$dbsounds_query,
&$dbsound_selected
)
{
//Dope the return variables for consistency.
$dbsounds_total = 0;
$dbsounds_query = 0;
$dbsound_selected = 0;
$possibles = BGSOUND_bgsound_search_db($cleanliness, $topic, $minsize, $maxsize, $dbsounds_total);
if ($possibles === false)
{
//Nothing found.
$soundpath = "";
$soundcredit = "";
}
else
{
$c = count($possibles) / 6;
$dbsounds_query = $c;
//echo $c;
$target = rand(0, $c-1);
$dbsound_selected = $possibles[$target * 6];
//echo " ";
//echo $target;
$soundpath = $possibles[$target * 6 + 4];
$soundcredit = $possibles[$target * 6 + 5];
}
}
?>