summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaternamedesc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaternamedesc.cpp')
-rw-r--r--indra/newview/llfloaternamedesc.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp
index d4c9478fdf..392696dc9c 100644
--- a/indra/newview/llfloaternamedesc.cpp
+++ b/indra/newview/llfloaternamedesc.cpp
@@ -140,6 +140,13 @@ BOOL LLFloaterNameDesc::postBuild()
y -= llfloor(PREVIEW_LINE_HEIGHT * 1.2f);
+ if (mIsAudio)
+ {
+ LLSD bitrate = gSavedSettings.getS32("AudioDefaultBitrate");
+
+ childSetValue("bitrate", bitrate);
+ }
+
// Cancel button
childSetAction("cancel_btn", onBtnCancel, this);
@@ -199,10 +206,16 @@ void LLFloaterNameDesc::onBtnOK( void* userdata )
fp->childDisable("ok_btn"); // don't allow inadvertent extra uploads
+ S32 bitrate = 0;
+
+ if (fp->mIsAudio)
+ {
+ bitrate = fp->childGetValue("bitrate").asInteger();
+ }
upload_new_resource(fp->mFilenameAndPath, // file
fp->childGetValue("name_form").asString(),
fp->childGetValue("description_form").asString(),
- 0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE);
+ bitrate, LLAssetType::AT_NONE, LLInventoryType::IT_NONE);
fp->close(false);
}